发布于 2016-12-20 11:23:44 | 191 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的Javascript教程,程序狗速度看过来!

JavaScript客户端脚本语言

Javascript 是一种由Netscape的LiveScript发展而来的原型化继承的基于对象的动态类型的区分大小写的客户端脚本语言,主要目的是为了解决服务器端语言,比如Perl,遗留的速度问题,为客户提供更流畅的浏览效果。


10个实用的脚本工具,其实就是将代码拷贝到IE地址栏中运行
下面介绍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地址栏中,回车运行即可(不能点后面的重新加载)

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务