JAVASCRIPT!!!

Posted on 16/09/2009 by

1



JAVASCRIPT IS USED FOR CREATING INTERACTIVE WEBPAGES, AND USE TO CREATE FUNCTIONS, EVENT HANDLERS, FORMS SENDING ALERT MESSSAGES AND HACKING OTHER SYSTEMS…Here I’m giving you  simple examples of JAVA!!!

Example 1:

JavaScript Content

<html>
<body>
<script type=”text/javascript”>
document.write(“Hi guyS! Do you knw wht Javascript is used for and hw it can help you??…Well it can be used for creating different functions, mouse events, forms etc…”);
</script>
</body>
</html>

The Output!

Hi guyS! Do you knw wht Javascript is used for and hw it can help you??…Well it can be used for creating different functions, mouse events, forms etc…

Example 2:

Javascript Heading Style

<html>
<body>
<script type=”text/javascript”>
document.write(“<h1>This is a Javascript</h1>”);
document.write(“<p>This is a A JavaScript statement is a command to a browser</p>”);
document.write(“<p>JavaScript code (or just JavaScript) is a sequence of JavaScript statements.</p>”);
</script>
</body>
</html>

The Output!!

This is a JavaScript

This is a A JavaScript statement is a command to a browser

JavaScript code (or just JavaScript) is a sequence of JavaScript statements.

Example 3 :

Javascript Names

<html>
<body>
<script type=”text/javascript”>
var firstname;
firstname=”Ellahax”;
document.write(firstname);
document.write(“<br />”);
firstname=”Anarchia”;
document.write(firstname);
</script>
<p>This document is to display the names</p>
</body>
</html>

The Output

Ellahax
Anarchia

This document is to display the names

Example 4 :

Javascript Strings

<html>
<body>
<script type=”text/javascript”>
x=100+100;
document.write(x);
document.write(“<br />”);
x=”45″+”45″;
document.write(x);
document.write(“<br />”);
x=105+105;
document.write(x);
document.write(“<br />”);
x=”25″+25;
document.write(x);
document.write(“<br />”);
</script>
<p>add two different numbers with the strings it gives u the same number, but if u r not using strings to get the output.</p>
</body>
</html>

The Output

200
4545
210
2525

add two different numbers with the strings it gives u the same number, but if u r not using strings to get the output.

EllaHax

Advertisements
Posted in: Coding, JavaScript