Saturday, 18 October 2014

javascript practicle tutorial (choksi ahmad)



JavaScript
Javascript Is THE Scripting Language Of The Web.

Javascript Is Used In Millions Of Web Pages To Add Functionality, Validate Forms, Detect Browsers, And Much More.



<html>

<body>



<script type="text/javascript">

document.write("Hello World!");

</script>



</body>

</html>


 
<html>
<body>
 
<script type="text/javascript">
document.write("<h1>Hello World!</h1>");
</script>
 
</body>
</html>
 
 
 
<html>
<head>
</head>
 
<body>
 
<script type="text/javascript">
document.write("This message is written by JavaScript");
</script>
 
</body>
</html>

<html>
<head>
<script type="text/javascript">
function message()
{
alert("This alert box was called with the onload event");
}
</script>
</head>
 
<body onload="message()">
 
<p>We usually use the head section for functions 
(to be sure that the functions are loaded before they are called).</p>
 
</body>
 
 
 
 
<html>
<head>
<script type="text/javascript">
function message()
{
document.write("MY NAME IS CHOKSI AHMAD");
}
</script>
</head>
 
<body>
<input type="button" value="click here" onclick="message()">
 
<p>We usually use the head section for functions (to be sure that the functions are loaded before they are called).</p>
 
</body>
</html>


<html>
<body>
 
<script type="text/javascript">
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph.</p>");
document.write("<p>This is another paragraph.</p>");
</script>
 
</body>
</html>


<html>
<body>
 
<script type="text/javascript">
// Write a heading
document.write("<h1>This is a heading</h1>");
// Write two paragraphs:
document.write("<p>This is a paragraph.</p>");
document.write("<p>This is another paragraph.</p>");
</script>
 
</body>
</html>


<html>
<body>
 
<script type="text/javascript">
/*
The code below will write
one heading and two paragraphs
*/
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph.</p>");
document.write("<p>This is another paragraph.</p>");
</script>
 
</body>
</html>
 
 
 
 
 
    javascript practicle tutorial 

1 comment: