JavaScript - Get textbox text in javascript - Asked By Ali Khan on 03-Jul-12 02:50 AM

I want to check the text of textbox in javascript, how can i do that ,, the issue is that the value is retrieve from XML file, not by typing...

How can i do that ?mean onclienttextchange is there any method in textbox?

balaji replied to Ali Khan on 03-Jul-12 04:17 AM
call this function

function check()
{
if(document.getElementById("ID").value=="somethis"){....}
}
Jitendra Faye replied to Ali Khan on 03-Jul-12 04:25 AM
Use this code to get TextBox value in javascript-

var val= document.getElementById("<%= TextBox1.Text %>").value;