0

hi kindly help me here.....

i have written code like this to display hi when page gets loaded.
please correct it this code so as to display message.

<html>
<head>
<script type="text/javascript" src="jquery-2.0.3.min.js"></script>
<script type="text/javascript">

$(document).ready(function(){
$("#b").load(function(){
alert("hi");

});
});
</script>
</head>
<body>
.........
......
....
</body>
</html>
3
Contributors
3
Replies
22
Views
3 Years
Discussion Span
Last Post by JorgeM
0

small correction to the above code... please read <body> as <body id="b">

0
<html>
<head>
<script type="text/javascript">
alert("hi");
</script>
</head>
<body>
.........
......
....
</body>
</html>
0

@shrikanthnk-is there something else you have in mind because it seems like this is too simplistic of an example. As you can see from paulkd's example, there is no need to incorporate jQuery to simply generate an alert to say "Hi" on page load.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.