我想从 onClick 按钮后面的代码中打开对话框窗口。如何运行脚本?
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/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.2/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<div id="dialog" title="Alert!!!" style="display: none;">
<p>
Lorem Ipsum
</p>
</div>
private void InitializeComponent()
{
this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
{
//Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "$(function() {$('#dialog').dialog('open');});", true);
}