以下是我的jQuery代码:
<meta charset="utf-8">
<title>jQuery UI Dialog - Modal confirmation</title>
<link href="Styles/jquery.ui.all.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css"/>
<script src="Scripts/jquery-1.6.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.bgiframe-2.1.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.core.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.mouse.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.button.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.dialog.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.draggable.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.position.js" type="text/javascript"></script>
<link href="Styles/demos.css" rel="stylesheet" type="text/css" />
<script>
$(function () {
$("#dialog:ui-dialog").dialog("destroy");
$("#btnprnt").dialog({
resizable: false,
height: 140,
modal: true,
buttons: {
"Yes": function () {
$(this).dialog("close");
},
No: function () {
$(this).dialog("close");
}
}
});
});
</script>
这是我的按钮点击事件:
protected void btnprnt_Click(object sender, EventArgs e)
{
//Response.Redirect("Print.aspx");
ScriptManager.RegisterClientScriptBlock(this, this.GetType (), "NewWindow", "function();", true);
}
我的按钮位于ajax面板中。 我在代码后面调用jquery函数。 但是这个按钮点击不会激活jquery。