<html>
<head>
<title>Looking for Javascript</title>
<script>
window.addEventListener("load",registerEvents,false);
function registerEvents(e){
document.getElementById("ask")
.addEventListener("click",findAnswer,false);
}
function findAnswer(){
//get the user's question
var question= document.
getElementById("userQuestion").value;
/*create a new regular expression object that will look for an exact match match of the string "Javascript". */
var re= new RegExp("Javascript");
// if "Javascript" is found in the user's question
if (re.test(question)===true){
//print out an answer.
document.getElementById("answer").innerHTML="Javascript Question? Check out Coding with Javascript for Dummies by Chris Minnick and Eva Holland";
//and yell "Javascript" in the console.
console.log("Javascript");
}
}
</script>
</head>
<body>
<form id="userInput"></label>
<label>Enter your question:
<textarea id="userQuestion" </textarea>
<button id="ask" type="button">Get An Answer>Get An Answer</button>
</form>
<div id="answer"/>
</div>
</body>
</html>
>>56151227
you forgot to install gentoo
>>56152164
Autist
>>>/g/wdg
I don't help commies, fuck off
>>56151227
script at the bottom, never on top