Jquery不在firefox中工作,在所有其他浏览器中都可以正常工作

时间:2015-02-24 11:26:09

标签: javascript jquery html

我不知道为什么它停止工作,它在firefox中工作正常,但现在它无法正常工作。

只需使用简单的class =“validate [required]”

如果没有“需要字段”,它就会跳过它

它可以与safari,chrome和IE一起使用

  <html>
<head>
<meta charset="UTF-8">
<title>register</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="css/validationEngine.jquery.css" charset="UTF-8">
<script type="text/javascript" src="js/jquery-1.8.2.min.js" charset="UTF-8"></script>
<script src="js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>

<script>
$(document).ready(function(){
    $("#formid").validationEngine();
   });
   </script>

</head>

并在另一页上,但两个都停止工作,但在所有其他浏览器上正常工作..

<html>
<head>
<meta charset="UTF-8">
<title> Log in </title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" href="css/validationEngine.jquery.css" charset="UTF-8">
<script type="text/javascript" src="js/jquery-1.8.2.min.js" charset="UTF-8"></script>
<script src="js/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
<script>
$(document).ready(function(){
    $("#formid").validationEngine();
   });
   </script>
   <script type="text/javascript">
   function isNumberKey(evt){
    var charCode = (evt.which) ? evt.which : event.keyCode
    if (charCode > 31 && (charCode < 48 || charCode > 57))
        return false;
    return true;
}
</script>

在控制台中发现错误:

SyntaxError: missing ; before statement Error: jQuery.validationEngine rules are not loaded, plz add localization files to the page

0 个答案:

没有答案