validate input, communicate with web servers, and much more.
alert( “Date : ” + Date() );
<button type=”button” onclick=”displayDate()”>Display Date</button>
jsFiddle is a free code-sharing tool that allows you to edit, share, execute and debug Web code within a browser.
My Fiddles: http://jsfiddle.net/user/austinnoronha/fiddles/