How to check whether Textbox object is initialized or not in Javascript?

 Posted by vishalneeraj-24503 on 1/12/2014 | Category: JavaScript Interview questions | Views: 3555 | Points: 40
Answer:

We can check textbox object as,

var txt_emp_salary = document.getElementById("<%=txt_employee_salary.ClientID%>");

if(txt_emp_salary !=null)
alert('Object is initialized');
else
alert('Object is not initialized');


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response