Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
173
rated 0 times [  180] [ 7]  / answers: 1 / hits: 67906  / 10 Years ago, thu, april 10, 2014, 12:00:00

I want to get user inputs using the tag in HTML and not the prompt function in JavaScript.



I also don't want to have to use another language on top of this like php.



Edit
Something like this would be desirable



<form action=demo_form.asp>
First name: <input type=text name=fname><br>
<input type=submit value=Submit>
</form>


but without using a .asp


More From » html

 Answers
9
<input type=text id=input1 />
<button onclick=myJsFunction()></button>
<script type=text/javascript>
function myJsFunction(){
var text=document.getElementById('input1').value;
}
</script>

[#71531] Tuesday, April 8, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
helenat

Total Points: 450
Total Questions: 95
Total Answers: 97

Location: Central African Republic
Member since Mon, Aug 10, 2020
4 Years ago
;