This post will help you to fetch the value from any input tag in the FORM Element.
The below code fetches the value of the text field when submit button is clicked and displays an JS alert counting the number of characters of the input string.
alert("Your name is "+nam+" and it has "+nam.length+" Chars");
<input type="text" placeholder="Enter your name!" id="myText"/><br/><br/>
<input type="submit" value="Submit">
Found any suggestions ?
Comment them here !
Latest posts by Bikash Panda (see all)
- Firmata protocol with Raspberry Pi and Arduino - September 13, 2017
- IOT:Power outlet controlled from internet using WeMOS - August 9, 2017
- OSMC on Raspberry PI with Setup and Control using Android App - July 7, 2017