Sir please can I use the data input by the user in form as a value of a variable | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Sir please can I use the data input by the user in form as a value of a variable

please i have to know hiw the websites show less than 18 years on the home screen when i type a value less than 18 in the age box

17th May 2018, 3:07 AM
praveen
praveen - avatar
4 Answers
+ 4
(id is input) var value = $("#input").val(); this with jquery pure js would be: var x = document.getElementById("input"); var value = x.value;
17th May 2018, 3:13 AM
Kawaii
Kawaii - avatar
+ 3
just to keep it more nice, and u can use that id again without writing all again, just x.something
17th May 2018, 5:44 PM
Kawaii
Kawaii - avatar
+ 1
praveen you have to use a different language along side html5 such as jquery or JavaScript to work with integers.
17th May 2018, 3:50 AM
BroFar
BroFar - avatar
+ 1
kawaii what is the need of var value=x.value
17th May 2018, 7:36 AM
praveen
praveen - avatar