Calling input | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Calling input

how do I call input in JavaScript

21st May 2018, 2:09 PM
Alieldien
Alieldien - avatar
5 Respostas
+ 3
<input type = "text" name = "" placeholder = "Enter your username" required oninput="doSomething()" > #js function doSomething(){ alert("hello"); }
21st May 2018, 2:24 PM
į Œį ŒBrains[Abidemi]
į Œį ŒBrains[Abidemi] - avatar
+ 2
eeehh if you mean get input..use prompt() var a=prompt("Enter you name");
21st May 2018, 2:16 PM
į Œį ŒBrains[Abidemi]
į Œį ŒBrains[Abidemi] - avatar
0
HTML: <input type = "text" name = "" placeholder = "Enter your username" required> how do I call this in JavaScript
21st May 2018, 2:22 PM
Alieldien
Alieldien - avatar
0
thanks
21st May 2018, 2:29 PM
Alieldien
Alieldien - avatar
0
HTML: <input type = "text" name = "" placeholder = "Enter your username" required oninput = "user()"> <button onclick = "welcome()" type = "submit" name = "" value = "login">login</button> JavaScript: function user (){} function welcome(){ alert ("welcome " + user());} he keeps saying for me welcome undefined
21st May 2018, 2:51 PM
Alieldien
Alieldien - avatar