JS Practical 7
JS Practical 7
<html>
<script>
function blur_event()
{
document.getElementById("n1").style.background =
"yellow";
var x = document.getElementById("n1");
x.value = x.value.toUpperCase();
}
</script>
<body>
<br> Enter Name = <input type="text" name="n1" id="n1"
onblur="blur_event()" /> <br>
<p><input type="submit" value="Submit"></p>
</body>
</html>
<htmL>
<head>
<title> ONLOAD EVENT </title>
</head>
<script>
function load()
{
alert("Page is loaded");
}
</script>
<body onload="load()">
<h2>HELLO WORLD</h2>
</body>
</html>
<htmL>
<head>
<title> CLICK EVENT </title>
</head>
<script>
function click_event()
{
document.write("<b>THANK YOU</b>");
}
</script>
<body>
<p><input type="submit" value="Click Here!!"
onclick="click_event()"> </p>
</body>
</html>