【问题标题】:jQuery Validation and Form Plugin ProblemjQuery 验证和表单插件问题
【发布时间】:2011-02-23 00:22:45
【问题描述】:

我没有运气在同一页面上运行这两个插件 表单:http://jquery.malsup.com/form/ 和验证:http://bassistance.de/jquery-plugins/jquery-plugin-validation/

每次我在 Firefox 中检查错误控制台时,都会显示“未定义 jQuery”

对不起,我忘了添加标题。

<head>
<script type="text/javascript" src="../jQuery/jquery.js"></script>
<script type="text/javascript" src="../jqueryValidation/jquery.validate.js"></script>
<script type="text/javascript" src="../jquery.form.js"></script>
</head>

<form id="form" name="form" method="post" action="Data.asp">
<input type="text" name="ISNo" id="ISNo" class="required"/>
<input type="text" name="ISDate" id="ISDate" class="required"/>
<input type="submit" value="save!">
</form>

<form name="Search" id="Search" method="post" action="Search.asp">
<input type="text" name="txtname" id="txtname"/>
<input type="text" name="txtaddress" id="txtaddress"/>
<input type="submit" value="Search">
</form>

【问题讨论】:

  • 你确定路径“../jQuery/jquery.js”对应jQuery.js的实际位置吗?这是一个相对路径。当心!
  • 是的,我确定我有正确的路径

标签: jquery jquery-plugins jquery-validate


【解决方案1】:

看起来不像是冲突,但更多的是找不到jQuery对象。

这个提醒是什么?

alert(typeof jQuery);

如果您收到undefined,请仔细检查您的路径。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-06
    • 1970-01-01
    • 1970-01-01
    • 2011-06-22
    • 1970-01-01
    • 1970-01-01
    • 2011-07-17
    相关资源
    最近更新 更多