【发布时间】:2015-04-27 13:22:04
【问题描述】:
我试图在单击链接时在 html 页面中打开一个对话框,但它向我显示了一个错误,例如对象不支持单击 ie 时的属性或方法“对话框”。
请检查我下面的代码
源文件
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
对话框代码
$("#link").click(function(c){
e.preventDefault();
var dialog = $('<p>Are you sure?</p>').dialog({
buttons: {
"Yes": function() {alert('you chose yes');},
"No": function() {alert('you chose no');},
"Cancel": function() {
dialog.dialog('close');
}
}
});
});
});
【问题讨论】:
标签: javascript jquery html css jquery-ui