34,333
edits
Changes
m
→Accessing Objects in a Form
phone = document.getElementById("phoneNumber");
</pre>
We can then use the phone variable to access the currtent text valueof the object:
<pre>
document.write ( "The text is " + phone.value );
</pre>