简体   繁体   中英

Parsley js doesn't work on IE9 and below

I'm using jQuery 1.8.3 and Parsley.js. Everything works fine on Chrome, Firefox and IE10 but doesn't work on older versions of IE. I already tried changing version of jQuery (from 2.x to 1.9.1 and 1.8.3) but it didn't help.

Here's fragment of my code:

<html>
<head>
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
  <script src="garlic.js" type="text/javascript"></script>
  <script src="parsley.min.js" type="text/javascript"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style.css">
  <META charset="utf-8" HTTP-EQUIV="refresh" CONTENT="60">
</head>
<body>
<form data-persist="garlic" data-validate-parsley name="formularz" id="formularz" method="POST" action="register.php"  >                                                                                 
      <table border="0" cellspacing="0">
      <tr class="orange">
        <td colspan = "2" align="center">Wpisz dane:</td>
      </tr>
      <tr class="lightgrey">
        <td class="lightgrey"><label for="imie">Imię:</label></td><td><input type="text" name="imie" required/></td>
      </tr>
      <tr class="darkgrey">
        <td class="darkgrey"><label for="nazwisko">Nazwisko:</label></td><td><input type="text" name="nazwisko" required/></td>
      </tr>
      <tr class="lightgrey">
        <td class="lightgrey"><label for="email">E-mail:</label></td><td><input type="email" name="email" required/></td>
      </tr>
      <tr class="darkgrey">
      <td class="darkgrey"><label for="login">Login:</label></td><td><input type="text" name="login" required/></td>
      </tr>
      <tr>                                                                                                                          
      <td></td><td align="right"><input class="greenB" type="submit" name="submit" value="Zapisz się"></td>
      </tr>
      </table>
</form>
</body>
</html>

1) Which Parsley version are you running ? We use Parsley2 in production at Wisembly and I regularly test Parsley2 against IE7/8/9 and this is perfectly working / supported.

2) Could you remove Garlic.js from your code example. Although I can guarantee that Parsley2 is fine for IE7+, this is not the case for Garlic.js that may break your javascript.

Best

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM