My code is very simple, as I am just learning to use JavaScript.
I am trying to make a HTML5 button
element perform a simple alert function when clicked on. However, with the following code, the button does nothing.
function theFunction(){
alert("Hi there");
}
<button type="button" onlick="theFunction()">Button</button>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…