之乎者也,阿弥陀佛

软件设计的原则就是,化繁为简,化难为易,把人的思维集中在简单的领域,然后通过有序的组合实现复杂的逻辑。

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
使用jQuery UI 1.7.2 dialog插件,遇到这样的错误:

 

[img]http://dl.iteye.com/upload/attachment/308166/97c428e4-2ce2-367e-b4df-4c4da7686b95.bmp" alt="" width="210" height="44[/img]

    $("#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?"+new Date().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中就会出现此错误

 

posted on 2012-04-23 17:51  搏击的小船  阅读(8961)  评论(0编辑  收藏  举报