我正在使用jquery顯示一個對話框,但它導致IE6和IE7掛起。建議任何人?由於jquery對話框IE6和IE7掛起
$(""#" + this.pnlConfirmPanel.ClientID + @""").dialog(
{
autoOpen: false,
modal:true,
resizable: false,
draggable: false
})
從而導致它掛線是:
modal:true
更新1 對不起必須澄清了一個asp.net頁面,生成的代碼看起來是這樣的:
$("#ctl00_ContentPlaceHolder1_JobAdmin1_pnlConfirmPanel").dialog(
{
autoOpen: false,
modal:true,
resizable: false,
draggable: false
})
如果我刪除模態:true,則對話框在IE6和IE7中均顯示並關閉。其時,我添加模式:真行,導致瀏覽器崩潰...
更新2
以爲我會發布JavaScript和HTML的休息,以防萬一有人想嘗試出來。 (爲了簡化我短路長標識符我有面板上方)
<script src="JavaScript/jquery-1.5.2.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-1.8.11.custom.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$().ready(function() {
$("#ConfirmPanel").dialog(
{
autoOpen: false,
width: 400,
height: 300,
modal: true
});
$('#Button1').click(function() {
$("#ConfirmPanel").dialog('open');
return false;
});
});
</script>
<span id="lblClicked"></span>
<input type="submit" name="Button1" value="Test" id="Button1" />
<div id="ConfirmPanel" style="width: 400px; height: 200px;">
<input type="submit" name="btnClose" value="" id="btnClose" />
<h2>
Hello</h2>
</div>
</form>
@rauland:選擇器中的所有引號是什麼? – Marko 2011-04-14 20:56:29
@Marko我更新了問題 – rauland 2011-04-14 21:05:14
也許不相關,但是你有沒有嘗試在調用'dialog'的結尾添加分號? – Jacob 2011-04-14 21:16:50