DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> 關於JavaScript >> 10個實用的腳本代碼工具
10個實用的腳本代碼工具
編輯:關於JavaScript     
下面介紹10個實用的
浏覽輔助
Tidy Read
復制代碼 代碼如下:javascript:(function(){var s=document.createElement("script");s.charset="gb2312";s.language="javascript";s.type="text/javascript";s.src="http://tidyread.com/tidyread.js?u="+encodeURIComponent(document.location.href)+"&t="+encodeURIComponent(document.title);document.body.appendChild(s)})();

將那些亂糟糟的頁面清理干淨,更加可以自由設置喜好,很強大。

Show Password
復制代碼 代碼如下:javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "n"; } } if (s) alert("Passwords in forms on this page:nn" + s); else alert("There are no passwords in forms on this page.");})();

查看網頁上顯示為*****的密碼。覺得很有用處,比如當Chrome記住密碼,而你忘了時...

Dictionary.com
復制代碼 代碼如下:javascript:(function(){ q=document.getSelection(); if(!q) q=prompt('Dictionary.com Search:'); if(q) location.href='http://dictionary.reference.com/search?r=1&q='+escape(q); })()

翻譯選中的單詞,美中不足的是英英翻譯,適合英語有一定水平的朋友。

restore selecting
復制代碼 代碼如下:javascript:(function() { function R(a){ona = "on"+a; if(window.addEventListener) window.addEventListener(a, function (e) { for(var n=e.originalTarget; n; n=n.parentNode) n[ona]=null; }, true); window[ona]=null; document[ona]=null; if(document.body) document.body[ona]=null; } R("click"); R("mousedown"); R("mouseup"); R("selectstart"); })();

有些網站禁止選擇文本,它可以恢復之。貌似chrome用不了。

清除網站的cookies
復制代碼 代碼如下:javascript:(function(){C=document.cookie.split("; ");for(d="."+location.host;d;d=(""+d).substr(1).match(/\..*$/))for(sl=0;sl<2;++sl)for(p="/"+location.pathname;p;p=p.substring(0,p.lastIndexOf('/')))for(i in C)if(c=C[i]){document.cookie=c+"; domain="+d.slice(sl)+"; path="+p.slice(1)+"/"+"; expires="+new Date((new Date).getTime()-1e11).toGMTString()}})()

清除網站的cookies,Chrome用不了。

開發者工具

Reload CSS
復制代碼 代碼如下:javascript:void(setInterval(function(){var qs='?'+new Date().getTime(),l,i=0;while(l=document.getElementsByTagName('link')[i++]){if(l.rel&&'stylesheet'==l.rel.toLowerCase()){if(!l._h)l._h=l.href;l.href=l._h+qs}}},2000));

讓網頁不斷的重載CSS。

Spry Media
復制代碼 代碼如下:javascript:function fnStartDesign(sUrl) {var nScript = document.createElement('script');nScript.setAttribute('language','JavaScript');nScript.setAttribute('src',sUrl);document.body.appendChild(nScript);}fnStartDesign('http://www.sprymedia.co.uk/design/design/media/js/design-loader.js');

十分強大的工具。包含:網格,標尺,單位測量,十字線。建議web設計師試一下。

Layout Grid
復制代碼 代碼如下:javascript:void(myDiv=document.createElement('div'));void(myBody=document.getElementsByTagName('body')[0]);void(myDiv.style.background='url(http://www.andybudd.com/images/layoutgrid.png)');void(myDiv.style.position='absolute');void(myDiv.style.width='100%');void(myDiv.style.height='100%');void(myDiv.style.top='0');void(myDiv.style.left='0');void(myBody.appendChild(myDiv));

生成漂亮的網格。

Print Screen
復制代碼 代碼如下:javascript:window.location='http://aviary.com/' + location.href;

又一個推薦的工具。截取當前網頁,更可以自動進入aviary.com編輯該圖片。

Download as PDF
復制代碼 代碼如下:javascript:void(window.open('http://www.pdfdownload.org/web2pdf/Default.aspx?left=0&right=0&top=0&bottom=0&page=0&cURL='+document.location.href));

存儲網頁為pdf文件。

再提一句,Spry Media真的很好用。

偶爾因為網速慢,可能導致不能正常運行,其它的都是經過測試的,效果不錯。

使用後,先打開想要操作的頁面, 然後復制腳本代碼,拷貝到IE地址欄中,回車運行即可(不能點後面的重新加載)
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved