我有这个javascript:
<script src="Scripts/jquery-3.0.0.min.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">
//Total out of range dialog
var opt = {
autoOpen: false,
modal: true,
width: 550,
height: 650,
buttons: { 'OK': function () { $(this).dialog('close'); } },
title: 'This is a test'
};
function ShowRangeDialog() {
$(function () {
$('#rangeDialog').dialog(opt).dialog("open");
});
};
</script>
我将此div放在标签容器中:
<div id="rangeDialog" style="display: none;" title="Total out of range">
<p>
Your line items total is out of the range allowed by the approval level you chose.
Please check the approval range and adjust the line items or quantities.
</p>
</div>
我有这个代码隐藏:
StringBuilder sb = new StringBuilder();
sb.Append("ShowRangeDialog();");
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "key", sb.ToString(), true);
当我运行时,&#34;弹出&#34;在页面底部显示为附加文本。当我点击&#39;确定&#39;按钮它隐藏。所以,它就像它的工作一样,但实际上并没有像它应该那样显示弹出窗口。
有什么想法吗?