Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript">
- counter=0;
- function incCounter(lala)
- {
- counter=counter+1;
- message.value=counter;
- if (counter == 20)
- {
- alert("Clicked the button too many times");
- }
- }
- </script>
- </head>
- <body>
- <h1>Button Example</h1>
- <form>
- <input type="text" readonly="yes" size="30" id="message" value="Button has not yet been pressed" />
- <input type="button" value="Click Me" onclick="incCounter(this.form)"/>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement