ตัวอย่างดูที่แถบ Status Bar

 

 1.ใส่ Code ไว้ใน Tag <head>
 2. ข้อความที่แสดงในแถบ Statusbar จะอยู่ตรงบรรทัดที่ 3ตรง var msg="................";ใส่ข้อความได้ตามต้องการ
 3. ในTag <body> เติมให้เป็น  <body onLoad="snapIn(50,0)">

 

Code
<script LANGUAGE="JavaScript">

<!--

function snapIn(jumpSpaces,position) { var msg = "ตัวอย่างการแสดงข้อความที่แถบStatusbarแบบส่งตัวอักษร"; var out = ""; for (var i=0; i<position; i++) { out += msg.charAt(i) } for (i=1;i<jumpSpaces;i++) { out += " " } out += msg.charAt(position); window.status = out; if (jumpSpaces <= 1) { position++; if (msg.charAt(position) == ' ') { position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) { jumpSpaces *= .09 } else { jumpSpaces-- } if (position != msg.length) { var cmd = "snapIn(" + jumpSpaces + "," + position + ")"; window.setTimeout(cmd,10); } return true }

//-->

</script>

 

[ Home ]  [ Chatroom ]  [ Board 1]  [Board 2 ]  [ Book ]  [ Sourcecode ]  [ Free ]  [ Servicesite ]  [ Link ]

1