只弹出一次更改文本框值的窗体
本文关键字:文本 窗体 一次 | 更新日期: 2023-09-27 18:20:26
我有一个asp页面,它在按钮点击事件中调用另一个弹出页面。并且通过以下代码从弹出页面返回的值很少。
function ShowSelfpopup() {var customizeParamGL = 'status:no;help:no;dialogWidth:600px;dialogHeight:550px;scrolling=no';
var FunctionID = document.getElementById("ctl00_contPlcHdrMasterHolder_LstxtHidFUNCTION_ID").value;
window.showModalDialog('corBrmBlockIssuAndMaintFindUI.aspx?Function_Id=' + FunctionID + '', window, customizeParamGL);
debugger;
if (XYZ_PID != '') {
debugger;
document.getElementById("ctl00_contPlcHdrMasterHolder_LsddlProductID99").value = XYZ_PID;
document.getElementById("ctl00_contPlcHdrMasterHolder_LstxtStartNo").value = XYZ_SN;
document.getElementById("ctl00_contPlcHdrMasterHolder_LstxtEndNo").value = XYZ_EN;
document.getElementById("ctl00_contPlcHdrMasterHolder_lstxthide").value = XYZ_BP;
aspnetForm.submit();
return true;
}
else {
return false;
}
}
现在我有一个LstxtEndNo的Text更改事件方法。它只在我第一次从弹出窗体获取数据时触发。下次我调用弹出窗体并通过调试确认获取数据时。但它既不改变文本框中的值,也不触发文本更改事件。
对于Javascript,不要在更改时使用Textchange事件
<head runat="server">
<title>
</title>
<script>
function AlertTest()
{
alert('hELLO');
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ajax:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </ajax:ToolkitScriptManager>
<div>
<asp:TextBox ID="Button1" runat="server" Text="Button" onchange="AlertTest()" />
</div>
</form>
</body>
尝试使用示例