+ 6
How to Get $user_input from <button> in html and input that in form Or anything else ?
8 Réponses
+ 6
<!doctype html>
<html>
<head>
<script>
function getUser(){
alert(document.getElementById("user"). value);
}
</script>
</head>
<body>
<Input id="user" type="text"/>
<button onClick="getUser()">Alert</button>
</body>
</html>
+ 5
Mikael W-Dox, if you know how to from pHp and javascript then ypu probably know such task can be done by html
+ 4
Kelvin Paul no , i ask for html , i know java and php can do this .
+ 4
yes
+ 4
Kelvin Paul ok thanks
+ 2
Did you mean using either php or JavaScript?
+ 2
Did you mean get user input using <input> tag with the help of button tag
+ 2
Please use JavaScript