返回列表 发帖

[交流] 几个比较有用的脚本书签

源自:https://www.squarefree.com/bookmarklets/webdevel.html
只需把它们拖到书签工具栏上即可。

ancestors   在状态栏左下角显示鼠标悬停所在页面元素的祖辈元素列表
javascript: (function(){function A(n,g){var p=n.parentNode,t=n.tagName;if(!p)return "";if(!t)return A(p,g);var T=t.toUpperCase(),b=(T!="TABLE"&&T!="TBODY"&&T!="THEAD"&&T!="TR"),c=n.className,i=n.id;return A(p,' > ')+(b?T:T.toLowerCase())+(c?"."+c:"")+(i?"#"+i:"")+(b?g:' ');}document.onmouseover=function(e){e=e?e:event;var s,g=e.target;g=g?g:e.srcElement;try{s=A(g,'');}catch(err){s=err.message;}window.status=s;return true;};window.status=A(document.documentElement,'');})()


zap style sheets 取消所有页面css效果
javascript: (function(){var i,x;for(i=0;x=document.styleSheets;++i)x.disabled=true;})();


generated source 生成当前页面代码 (很多元素是动态添加的)
javascript: (function(){ function htmlEscape(s){s=s.replace(/&/g,'&');s=s.replace(/>/g,'>');s=s.replace(/</g,'<');return s;} x=window.open(); x.document.write('<pre>' + htmlEscape('<html>\n' + document.documentElement.innerHTML + '\n</html>')); x.document.close(); })();

onerror alert 当页面脚本有错误了,弹出对话框警告
javascript:window.onerror = function(m,u,n) { alert("JS error: " + m + (/^javascript:/(u) ? "\n\n(bookmarklet)" : "\n\nLine " + n + " of \n" + u)); return true;/*suppress default error message*/ }; void 0

[ 本帖最后由 joshyupeng 于 2007-12-15 19:59 编辑 ]
想寻求我的帮助,email给我:joshyupeng#gmail.com(替换#为@),我不一定总是来这里。
没事可以来我的百度空间逛逛:http://hi.baidu.com/狼王

不错
挺实用的~
要求,就会给于;寻找,就会发现;敲门,就会打开。

TOP

返回列表