javascript get element by id textbox value

 

 

 

 

I have a simple javascript function in aspx page. I would like to validate a required field. If the textbox was empty, then set the errormesssagetextbox value to "Patient number is required."