Skip to content

Instantly share code, notes, and snippets.

View david-mark's full-sized avatar

David Mark david-mark

  • David Mark LLC
  • West Chester, OH
View GitHub Profile
@david-mark
david-mark / gist:4312841
Created December 16, 2012 20:54
Unobtrusive JS === Unrealistic JS

Unobtrusive JS === Unrealistic JS

In general, Web developers want to be seen using the very latest and "greatest" Web technologies. We want to add buzzwords to our CV's as soon as they are coined and want to be considered "cutting edge" developers who are "moving the Web forward". Unfortunately, history takes a dim view of our exuberance and science ignores it completely.

Best to start at the beginning with DOM0, which came out in the 90's. Here we have a button that alerts when clicked:

<button type="button" onclick="window.alert('Hello world!')">Click me!</button>