Monday, 16 July 2012
How to write javascript statements
<!DOCTYPE html>
<html>
<body>
<h1>My Web Page</h1>
<p id="demo">A Paragraph.</p>
<p id="myDIV">A DIV.</p>
<script type="text/javascript">
document.getElementById("demo").innerHTML="Hello Boy";
document.getElementById("myDIV").innerHTML="How are you?";
</script>
</body>
</html>
Result:
My Web Page
Hello Boy
How are you?
This post was written by: Bharathi
Bharthi is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “How to write javascript statements”
Post a Comment