Question

This is a much simpler and modified part of my original code.

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>
Was it helpful?

Solution

It should be :

onclick="hello()" instead of onclick=hello()

you could even use it as

onclick="alert('Hello')"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top