KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a text box element whose value I am trying to access using document.getElementById("id-name").value . I find that the call is returning a null instead of empty string. The data-type of the returned value is still string. Is null a string value? <input type="text" value="" id="mytext"> is the textbox whose value I am trying to fetch using var mytextvalue = document.getElementById("mytext").value;
Tags (comma-separated)
Save Edits
Cancel