我有一个文本框名称 txtEmpcode。当它失去焦点时,我想显示一条警报消息。我已经为上述功能编写了 jquery,但它不起作用......
这是我的jQuery
$(document).ready(function(){
var prm = Sys.WebForms.PageRequestManager.getInstance();
//Raised before processing of an asynchronous postback starts and the postback request is sent to the server.
prm.add_beginRequest(BeginRequestHandler);
// Raised after an asynchronous postback is finished and control has been returned to the browser.
prm.add_endRequest(EndRequestHandler);
AutoComp();//Function for autocomplete textbox
$("#<%=txtEmpCode.ClientID").change(function(){
alert("hai");
});
});
这是我的 asp.net 文本框
<asp:TextBox ID="txtEmpCode" runat="server" Width="250px" ToolTip="Enter EmployeeCode"
AutoPostBack="True" ontextchanged="txtEmpCode_TextChanged"></asp:TextBox>