隨筆 - 2  文章 - 1  trackbacks - 0
          <2008年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          常用鏈接

          留言簿(1)

          隨筆分類(1)

          隨筆檔案(4)

          link

          搜索

          •  

          積分與排名

          • 積分 - 3334
          • 排名 - 3481

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          1. oncontextmenu="window.event.returnValue=false" 將徹底屏蔽鼠標(biāo)右鍵
          <table border oncontextmenu=return(false)><td>no</table> 可用于Table

          2. <body onselectstart="return false"> 取消選取、防止復(fù)制

          3. onpaste="return false" 不準(zhǔn)粘貼

          4. oncopy="return false;" oncut="return false;" 防止復(fù)制

          5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址欄前換成自己的圖標(biāo)

          6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夾中顯示出你的圖標(biāo)


          7. <input style="ime-mode:disabled"> 關(guān)閉輸入法


          8. 永遠(yuǎn)都會(huì)帶著框架
          <script language="JavaScript"><!--
          if (window == top)top.location.href = "frames.htm"; //frames.htm為框架網(wǎng)頁(yè)
          // --></script>


          9. 防止被人frame
          <SCRIPT LANGUAGE=JAVASCRIPT><!--
          if (top.location != self.location)top.location=self.location;
          // --></SCRIPT>


          10. 網(wǎng)頁(yè)將不能被另存為
          <noscript><*** src="/*.html>";</***></noscript>


          11. <input type=button value="/查看網(wǎng)頁(yè)源代碼
          onclick="window.location = "view-source:"+ "http://www.pconline.com.cn"">
          12.刪除時(shí)確認(rèn)
          <a href=""javascript :if(confirm("確實(shí)要?jiǎng)h除嗎?"))location="boos.asp?&areyou=刪除&page=1"">刪除</a>


          13. 取得控件的絕對(duì)位置
          //Javascript
          <script language="Javascript">
          function getIE(e){
          var t=e.offsetTop;
          var l=e.offsetLeft;
          while(e=e.offsetParent){
          t+=e.offsetTop;
          l+=e.offsetLeft;
          }
          alert("top="+t+"/nleft="+l);
          }
          </script>
          //VBScript
          <script language="VBScript"><!--
          function getIE()
          dim t,l,a,b
          set a=document.all.img1
          t=document.all.img1.offsetTop
          l=document.all.img1.offsetLeft
          while a.tagName<>"BODY"
          set a = a.offsetParent
          t=t+a.offsetTop
          l=l+a.offsetLeft
          wend
          msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
          end function
          --></script>


          14. 光標(biāo)是停在文本框文字的最后
          <script language="javascript">
          function cc()
          {
          var e = event.srcElement;
          var r =e.createTextRange();
          r.moveStart("character",e.value.length);
          r.collapse(true);
          r.select();
          }
          </script>
          <input type=text name=text1 value="123" onfocus="cc()">


          15. 判斷上一頁(yè)的來(lái)源
          javascript :
          document.referrer
          posted on 2008-06-25 13:20 onlyfish 閱讀(323) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 四川省| 合肥市| 海南省| 昌都县| 九龙坡区| 屏边| 莫力| 棋牌| 永川市| 宁武县| 孝义市| 铅山县| 福建省| 浪卡子县| 和田市| 潮安县| 华蓥市| 延津县| 黑山县| 灵武市| 加查县| 中阳县| 沐川县| 顺平县| 周至县| 乌兰浩特市| 宝坻区| 阳西县| 偏关县| 商城县| 策勒县| 淄博市| 南皮县| 石首市| 靖远县| 永嘉县| 新建县| 黔西县| 陇南市| 定日县| 中超|