<!DOCTYPE HTML>
<html>
<head>
<title> Different ways to dispaly content on webpage 3 ways to display content 1. document.write(Testing Purpose) 2. window.alert (Alert Box) 3. innerHTML (Form Validations)</title>
</head>
<body>
<p id = "demo"> paragraph</p>
<script type= "text/javascript">
document.getElementById("demo").innerHTML = "Hi Narendra innerHTML message display"; // form validations it is very useful
//window.alert("Narendra first alert js"); // it will show alert popup/window
//alert("Narendra first alert js"); // it will show alert popup/window
//document.write("Narendra first js"); //testing purpose to display the data
</script>
</body>
</html>
No comments:
Post a Comment