alert("Hello World");
var WORLD = "World";function hello(who) { alert("Hello " + who);};hello(WORLD);
<button onclick="hello(WORLD)">Say Hello</button>
<button id="hello">Say Hello</button>
var button = document.all.hello;button.onclick = function() { hello(WORLD);};
var button = document.getElementById("hello");button.addEventListener("click", function(event) { hello(WORLD);}, false);
var Hello = new Binding({ greet: function(who) { alert("Hello " + who); }, onclick: function() { this.greet(Hello.WORLD) }}, { WORLD: "World"});document.bind("#hello", Hello);