So I have an html program with a box in which a user can input items how do I write the JavaScript code to take these items individually and assign them to variables?
2/12/2018 2:26:09 AM
Allison4 Answers
New AnswerHi, If you're not intending to use the GET or POST arrays, javascript can read html tags and the text inside (the DOM). Your box is an <input type="text"> or something like <textarea> ... There are quite some ways to access that, but you can give your form field somme attributes like id=field, and target the element with the getElementById method. By the way, that's even shorter using jQuery.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message