Just Copy and Paste in your page.
<body onload="position_at_top();expand()">
<form id="form1" runat="server">
<div style="position:absolute;color:black" id="test"></div>
<script>
//Change the message below
var themessage = "Welcome sarojAsp.net page"
var fontsize = 10
//Below determines how long the message will appear before disappearing. 3000=3 seconds
var appearfor = 3000
function position_at_top() {
if (document.layers)
document.test.top = pageYOffset
else if (document.all) {
test.innerHTML = '<div align=center><font face="Arial">' + themessage + '</font></div>'
setTimeout("test.style.top=document.body.scrollTop+10;test.style.left=document.body.scrollLeft+10", 100)
}
else if (document.getElementById) {
document.getElementById("test").innerHTML = '<div align=center><font face="Arial">' + themessage + '</font></div>'
document.getElementById("test").style.top = pageYOffset
}
}
function expand() {
if (document.layers) {
document.test.document.write('<div align=center style="font-size:' + fontsize + 'px"><font face="Arial">' + themessage + '</font></div>')
document.test.document.close()
}
else if (document.all)
test.style.fontSize = fontsize + 'px'
else if (document.getElementById)
document.getElementById("test").style.fontSize = fontsize + 'px'
fontsize += 5
if (fontsize > 90) {
if (document.layers)
setTimeout("document.test.visibility='hide'", appearfor)
else if (document.all)
setTimeout("test.style.visibility='hidden'", appearfor)
else if (document.getElementById)
setTimeout("document.getElementById('test').style.visibility='hidden'", appearfor)
return
}
else
setTimeout("expand()", 50)
}
</script>
</form>
<body onload="position_at_top();expand()">
<form id="form1" runat="server">
<div style="position:absolute;color:black" id="test"></div>
<script>
//Change the message below
var themessage = "Welcome sarojAsp.net page"
var fontsize = 10
//Below determines how long the message will appear before disappearing. 3000=3 seconds
var appearfor = 3000
function position_at_top() {
if (document.layers)
document.test.top = pageYOffset
else if (document.all) {
test.innerHTML = '<div align=center><font face="Arial">' + themessage + '</font></div>'
setTimeout("test.style.top=document.body.scrollTop+10;test.style.left=document.body.scrollLeft+10", 100)
}
else if (document.getElementById) {
document.getElementById("test").innerHTML = '<div align=center><font face="Arial">' + themessage + '</font></div>'
document.getElementById("test").style.top = pageYOffset
}
}
function expand() {
if (document.layers) {
document.test.document.write('<div align=center style="font-size:' + fontsize + 'px"><font face="Arial">' + themessage + '</font></div>')
document.test.document.close()
}
else if (document.all)
test.style.fontSize = fontsize + 'px'
else if (document.getElementById)
document.getElementById("test").style.fontSize = fontsize + 'px'
fontsize += 5
if (fontsize > 90) {
if (document.layers)
setTimeout("document.test.visibility='hide'", appearfor)
else if (document.all)
setTimeout("test.style.visibility='hidden'", appearfor)
else if (document.getElementById)
setTimeout("document.getElementById('test').style.visibility='hidden'", appearfor)
return
}
else
setTimeout("expand()", 50)
}
</script>
</form>
No comments:
Post a Comment