Java Script dynamic Title
This javascript causes the message in the title bar to change every 10 seconds.
javascript code :
----------------------
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function settitle() {
var a = "You can find every thing you need here. ";
var b = "Best collection of scripts";
var c = "Easy to use through cut & paste";
var t = new Date();
s = t.getSeconds();
if (s == 10) {
document.title = a;}
else if (s == 20) {
document.title = b;}
else if (s == 30) {
document.title = c;}
else if (s == 40) {
document.title = a;}
else if (s == 50) {
document.title = b;}
else if (s == 00) {
document.title = c;}
setTimeout("settitle()", 1000);
}
// End -->
</script>
Html code :<form>
----------------------
Click <input type="button" onClick="settitle()" value="Start">
</form>
Labels: java script, javascript
2 Comments:
the code is working
the code is working
Post a Comment
Subscribe to Post Comments [Atom]
<< Home