jquery模式弹出锁定字段

时间:2012-12-14 00:40:43

标签: jquery asp.net-mvc razor

我有jquery模式弹出窗口在ie和chrome上工作正常,但所有输入字段都在firefox中锁定,任何输入都将非常感激。 感谢

项目:MVC /剃刀 这是调用对话框的代码

@Ajax.ActionLink("AddBulk", "BulkDialog", "controller", 
    new {disId = disId }, 
    new AjaxOptions { HttpMethod = "get", UpdateTargetId = "gcd", OnSuccess = " function() { $('#gcd').dialog({modal:true, dialogClass: 'gDialog', closeOnEscape: false, resizable: false, width:428,height:400});}" })

1 个答案:

答案 0 :(得分:0)

我从不喜欢@Ajax助手,而是喜欢像jQuery一样做代码:

<div id="gcd"></div>
    <a id="AddBulkLink">AddBulk</a>

    <script language="javascript" type="text/javascript">
    $('#AddBulkLink').click(function(){        
         $('#gcd').load("controller/BulkDialog?disId =@disId") //mix of js and razor    
         $( "#gcd").dialog( "open" );
    })

    $('#gcd').dialog({
                 autoOpen: false, // So opens when link clicked
                 modal: true,
                 dialogClass: 'gDialog',
                 closeOnEscape: false,
                 resizable: false,
                 width: 428,
                     height: 400
                 });
    </script>

在我看来,这种方式更容易和可追溯