Jump to content

Cursed Button?


davej

Recommended Posts

Maybe my system is infected with something?

 

Somebody explain this...

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>title</title><script>alert('page load');var cnt;window.onload = init; function init() {  alert('init');  var c = document.getElementById("idbtn");  c.onclick = fncreate;  cnt = 0;} function fncreate() {  cnt++;  alert('global cnt='+ cnt);}</script></head><body><form id="data1"><button id="idbtn">REBOOT</button></form><p><b>Just click the REBOOT button repeatedly</b></p></body></html>
Edited by davej
Link to comment
Share on other sites

Oh, I never use the button tag. I always use the input tag, but just to be different I thought I would use the button tag for a change. I figured the default would obviously be type=button. If I have to type button type=button each and every time then I don't see any point to ever using it.

Edited by davej
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...