Tuesday, December 25, 2007

Prototype for Javascript

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

To get into : prototypejs

Example code using prototype :
--------------------------------
1) Download prototypejs from : Download
2) Create a 'prototype_test.html' file from the prototype.js downloaded directory.
3) Paste the below code and save it.
<html>
<head><title>Prototype JS</title></head>
<body>
Alert using Prototype js
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" charset="utf-8">
Event.observe(window,"load",init,false);
function init() {
alert('Welcome to gubs! by prototype world');
}
</script>
</body>
</html>
4. Open the html file through browser.
5. You can see the alert which is triggered using prototype.js.

No comments :

// Below script tag for SyntaxHighLighter