I am trying to log a text input to the developer console in Chrome. Here is my html:
<html>
<body>
<div class="container">
<div class="form-group">
<form name="myForm">
<label name='header'> Some label </label>
<input id='userInput' type='text' class='form-control' placeholder="some javascript value comes here" name='myInput'>
<button onclick="someFunction()"> Submit </button>
</form>
</div>
</div>
</body>
</html>
and here's the JavaScript:
<script>
function someFunction(){
var userInput=document.getElementById('userInput');
console.log('userInput);
}
</script>
can anybody tell me where am i getting wrong.