我不知道为什么,但我的Jquery对话框没有出现。
html代码
<div id="dialog" title="Uploaded Image">
<p> sample jquery dialog box </p>
</div>
脚本代码
<script>
$(function(){
$("#dialog").dialog({
model:true,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "blind",
duration: 1000
}
buttons:{
"Uploads": function(){
$(this).dialog("close");
}
"Cancel" : function(){
$(this).dialog("close");
}
}
});
});
</script>
我正在使用chrome
答案 0 :(得分:2)
您在","
之后和hide
button
试试这个
$(function(){
$("#dialog").dialog({
modal:true,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "blind",
duration: 1000
},
buttons:{
"Uploads": function(){
$(this).dialog("close");
},
"Cancel" : function(){
$(this).dialog("close");
}
}
});
});
答案 1 :(得分:2)
您的脚本遗失了一些,
和}
$(function(){
$("#dialog").dialog({
modal:true,
show: {
effect: "blind",
duration: 1000
},
hide: {
effect: "blind",
duration: 1000
}, //Missing ,
buttons:{
"Uploads": function(){
$(this).dialog("close");
}, //Missing ,
"Cancel" : function(){
$(this).dialog("close");
}
}
});
});
演示:Fiddle