I want to combine these two blocks in the script. I want it so that when you type river into the text box i can give a good job statement or post a link.
I don't know what to use as the variable in the second statement. Which is the if statement.
var userInput.value=river;
if(userInput.value)=="river"){
document.write("hey");
}
<br/>
function changeText2(){
var userInput=document.getElementById('userInput').value;
document.getElementById('boldStuff2').innerHTML=userInput;
}
</script>
<p>What has a mouth but can't chew?<b id='boldStuff2'>???</b></p>
<input type='text' id='userInput' value='Enter Answer Here'/>
<input type='button' onclick='changeText2()' value='Answer'/>
</head>
</html>