As shown below:
Code
Copy Code code as follows:
<input id= "Txt_title" runat= "name=" Txt_title "style=" width:150px; height:20px "maxlength=" "type=" text "onchange=" Checkresume (' Ctl00_head_txt_title ', ' title '); "
onkeyup= "Checkresume (' Ctl00_head_txt_title ', ' title ')"/><span id= "title" ></span> (<span
style= "COLOR: #CC0000" >*</span> title cannot be blank)
The actual JS is shown below
Code
Copy Code code as follows:
function Checkresume (_obj1, _obj2) {
Alert (document.getElementById (_OBJ1). value);
if (document.getElementById (_obj1). Value = = "") {
document.getElementById (_obj2) InnerHTML = " ';
return false;
}
else {
document.getElementById (_obj2) InnerHTML = " ';
return true;
}
}
The actual call is shown below
Code
Copy Code code as follows:
<input id= "Txt_title" runat= "Server" Name= "Txt_title" style= "width : 150px; height:20px "maxlength=" "type=" text "onchange=" Checkresume (' Ctl00_head_txt_title ', ' title '); "
onkeyup= "Checkresume (' Ctl00_head_txt_title ', ' title ')"/><span id= "title" ></span>