我有HTML中的表我想上一個行會出現一個對話框,並更新我的數據庫,按我做一個Ajax調用有點像這樣:對話框
$(document).ready(function() {
$('.myrow').click(function()
{
$("#dialog").dialog({
autoOpen: false,
modal: true,
width: 600,
height: 300,
resizable: false,
buttons: {
"Yeah!": function() {
$(this).dialog("close");
},
"Sure, Why Not": function() {
$(this).dialog("close");
}
}
});
$.ajax({
type: "post",
url: "shownotification.jsp",
data: {
notifyidd: $(this).attr("id")
},
error : function(){
alert('Error');
},
success: function(msg){
alert('Success');
}
});
});
});
但該對話框不appearing.Please幫助。
在HTML中已做了對話框divison:
<div id="dialog"></div>
我還包括必要的JS和CSS文件。
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/ui-darkness/jquery-ui.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
,但仍然沒有success.Please幫助
@MrCode不,我在我的代碼 – user3522121