Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to take input from user in javascript console

there's not input console you can get the value from input in html
ex:
<input type="text" id="inp">
<button onclick="show()"></button>

//javascript
var text = document.getElementById("inp")
function show(){
alert(text.value)
}
Source by sebhastian.com #
 
PREVIOUS NEXT
Tagged: #input #user #javascript #console
ADD COMMENT
Topic
Name
4+6 =