jQuery UI dialog插件出错信息:$(this).dialog is not a function
2016-10-24 17:32
507 查看
$("#dialog").dialog({
width: 480,
height:"auto",
resizable: false,
draggable: true,
modal: true,
position: "center",
autoOpen: false,
dialogClass: "dialog",
buttons: {"关闭":function(){
$(this).dialog("close");
}}
});
$("#chglogpwd").bind("click",function(){
$("#dialog").dialog("option","height","400");
showModalDialog("#dialog","/accoun/acc/change_logpwd_fm.html?"+newDate().getTime(),"修改登录密码");
});
function showModalDialog(dialogEl,url,title,callback){
var $this = $(dialogEl);
$this.html("");
$this.dialog("option","title",title);
$this.dialog("open");
$this.load(url).removeClass("hideh");
}
调试了很久,发现在当前页面上加载了jquery的js资源,在被load的那个页面中也加载了jquery的资源。
<script type="text/javascript"src="/common/js/jquery-1.4.2.min.js"></script>
尝试将被load的页面中的jquery资源去除,错误便消除。
经测试:asp.net mvc 1.0/2.0不会出现此错误,但是mvc 3.0中就会出现此错误
width: 480,
height:"auto",
resizable: false,
draggable: true,
modal: true,
position: "center",
autoOpen: false,
dialogClass: "dialog",
buttons: {"关闭":function(){
$(this).dialog("close");
}}
});
$("#chglogpwd").bind("click",function(){
$("#dialog").dialog("option","height","400");
showModalDialog("#dialog","/accoun/acc/change_logpwd_fm.html?"+newDate().getTime(),"修改登录密码");
});
function showModalDialog(dialogEl,url,title,callback){
var $this = $(dialogEl);
$this.html("");
$this.dialog("option","title",title);
$this.dialog("open");
$this.load(url).removeClass("hideh");
}
调试了很久,发现在当前页面上加载了jquery的js资源,在被load的那个页面中也加载了jquery的资源。
<script type="text/javascript"src="/common/js/jquery-1.4.2.min.js"></script>
尝试将被load的页面中的jquery资源去除,错误便消除。
经测试:asp.net mvc 1.0/2.0不会出现此错误,但是mvc 3.0中就会出现此错误
相关文章推荐
- jQuery UI dialog插件出错信息:$(this).dialog is not a function
- jQuery UI dialog插件出错信息:$(this).dialog is not a function
- jQuery UI dialog插件出错信息:$(this).dialog is not a function
- jQuery UI dialog插件出错信息:$(this).dialog is not a function及js引入重复解决办法
- jQuery UI dialog插件出错信息:$(this).dialog is not a fun
- 使用jquery插件autocomplete时候出现typeerror:this.source is not a function即与jquery的autocomplete冲突
- jQuery Validation插件onfocosout/onkeyup出错的解决方法[Uncaught TypeError: undefined is not a function中文资料不好找]
- Extjs 报错 this.addEvents is not a function
- $('#dlg').dialog('open') is not a function
- selenium代理注入模式 this.onXhrStateChange.bind is not a function on session
- 出错处理:HTTP method GET is not supported by this URL
- jQuery UI:TypeError: elem[type] is not a function
- ExtJs this.addevents is not a function
- this.getColumnModel is not a function Extjs 如何解决呢? Extjs 导出 到Excel 解决方案问题
- 为什么在jsp页面引入js插件一直报 is not a function
- SQL SERVRE 2005 CLR TVF错误:从用户定义的表值函数获取新行时出错:Data access is not allowed in this context.
- Extjs4.0中的错误"this.getFullYear is not a function"解决
- VS2005中编译出错:Error 1 error C3872: '0x3000': this character is not allowed in an identifier
- 用CloneZilla 对包含ext4的OS 创建镜像出错“The Image magic error. This file is NOT partclone Image”
- Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is