It should be :
onclick="hello()" instead of onclick=hello()
you could even use it as
onclick="alert('Hello')"
Question
Anytime I call an event it doesn't function, I have tried too many times...any help would be appreciated.
<script type="text/javascript">
function hello ()
{
alert("Hello!!!");
}
</script>
<div id="platform">
<div id="mainOval">
<form id="btns">
<input type="button" value="Timer" id="timerBtn" onclick=hello()/>
<input type="button" value="Countdown" id="ctDownBtn" onclick=hello()/>
</form>
</div>
</div>
Solution
It should be :
onclick="hello()" instead of onclick=hello()
you could even use it as
onclick="alert('Hello')"