javascript經典效果(二)
腳本4:顯示最后修改時間的腳本
- <script>document.write(document.lastModified)</script>
腳本5:設為首頁,加為收藏,加入頻道,啟動outlook發信
- <a style="cursor:hand"
- onclick="this.style.behavior="url(#default#homepage)";
- this.setHomePage(http://10.13.31.90/~kayvin/);">">設為首頁</a>
- <a style="cursor:hand"
- onclick="window.external.AddFavorite(location.href,document.title);">加入收藏</a>
- <a href=
- <a href="mailto:kayvin@sohu.com">與我聯系</a>
腳本6:狀態欄動態顯示現在時間
- <script>
- function see(){
- window.setTimeout("see()",1000);
- today = new Date();
- self.status = today.toString();
- }
- </script>
- <body onload=see()>
腳本7:關閉窗口的腳本
- <a href=javascript:close()>[關閉窗口]</a>
腳本8:按下F12鍵,直接返回首頁
- <script>function look(){
- if(event.keyCode==123){document.location.href=http://10.13.31.90/~kayvin/}
- }
- if(document.onkeydown==null)
- {document.onkeydown=look}
- </script>
腳本9:后退,刷新,前進
- <input type=button value=后退 onclick=history.go(-1)>
- <input type=button value=刷新 onclick=history.go(-0)>
- <input type=button value=前進 onclick=history.go(+1)>
腳本10:設定時間彈出窗口,4000=4秒,當然你可以自定義
- <script>function l()
- {
- window.open(" 10.13.31.90/~kayvin/ ","name","width=500,height=150,border=0")
- }
- setTimeout("l()",4000)
- </script>
本文由用戶 quguiliang 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!