您的位置:首页 > 移动开发 > Objective-C

使用juery时出现Object doesn't support this property or method的问题。

2010-03-08 18:37 585 查看
网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; CIBA; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

时间戳: Mon, 8 Mar 2010 03:41:06 UTC

消息: Object doesn't support this property or method

行: 51

字符: 3

代码: 0

URI: http://localhost:8080/test.do

 

 

function checkForm() {
var isValid = $('#searchForm').validation({ // 出现错误的行
fromMailAddr : [
{type : 'email', msg : '<lucy:message key="message.counsel.search.mailaddrError"/>'+' ['+$("#fromMailAddr").attr("text")+']', focus : true, empty : true },
{type : 'maxb', max: eval($("#fromMailAddr").attr("maxbyte")), msg : $("#fromMailAddr").attr("maxbyte") + '<lucy:message key="message.common.warning.input.maxb"/>'+' ['+$("#fromMailAddr").attr("text")+']',  encode : 'utf-8',focus : true, empty:true}
]
});

return isValid;
}

 

 

因为我在include的js当中有一段代码是

 

jQuery.noConflict();

var j$ = jQuery;

 

所以只要include这个js 下面需要用 j$()来调用

代码改成

var isValid = j$('#searchForm').validation({

就ok了。。。。

这个问题花了我不少时间啊。

希望对遇到这个问题的朋友有些帮助。。。。。。。。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐