<html>
<head>
<script>
$(function(){
function display() {
alert("Hello World")
}
});
</script>
</head>
<body>
<p>Click the following button and see result</p>
<form>
<input type="button" onclick="display()" value="Click me" />
</form>
</body>
</html>