引用地址:http://bbs.syue.com/thread-36034-1-1.html
直接在ie地址栏输入命令,回车,执行js。
这样也可以用来改变和获取元素的值和属性,很实用的。
查看cookie
javascript:alert(document.cookie)
直接编辑cookie
javascript:document.cookie=window.prompt("Linx Edit cookie:",document.cookie);void(0);
打不开〖internet选项〗的时候
javascript:window.external.showBrowserUI("PrivacySettings",null)
显示网页源代码
javascript:s=document.documentElement.outerHTML;document.write('<body></body>');document.body.innerText=s;
网页放大1.5倍
javascript:void(s=document.body.style);void(z=s.getAttribute('zoom'));if(z){s.setAttribute('zoom',(parseInt(z)+50)+'%');}else
s.setAttribute('zoom','150%')
网页缩小0.5倍
javascript:void(s=document.body.style);void(z=s.getAttribute('zoom'));if(z){s.setAttribute('zoom',(parseInt(z)-50)+'%');}else
s.setAttribute('zoom','50%')
右键另存为
javascript:document.write('<a href="http://www.baidu.com/img/baidu_logo.gif">右键另存为</a>');
获取页面所有链接
javascript:var a="";for(i=0;i<document.links.length; i++ )a+=document.links(i).href+"<br/>";document.write(a);
获取链接进来的css文件
1(源码)
javascript:str='';c=document.styleSheets;for(i=0;i<c.length;i++){o=c[i];if
(o.href=='')continue;str+='==========
';str+=o.href;str+='<br><xmp>/n';str+=o.cssText;str+='</xmp><br><br>/n';};document.write(str);
2(地址)
javascript:str='<HTML><HEAD><BASE
HREF="';str+=document.URL;str+='"></HEAD><BODY><br>/n';c=document.styleSheets;for(i=0;i<c.length;i++){o=c[i];if
(o.src=='')continue;str+='<a
href="';str+=o.href;str+='">';str+=o.href;str+='</a><br>/n';};str+='</BODY></HTML>';document.write(str);
获取链接进来的js文件
javascript:str='<HTML><HEAD><BASE
HREF="';str+=document.URL;str+='"></HEAD><BODY><br>/n';c=document.scripts;for(i=0;i<c.length;i++){o=c[i];if
(o.src=='')continue;str+='<a
href="';str+=o.src;str+='">';str+=o.src;str+='</a><br>/n';};str+='</BODY></HTML>';document.write(str);
获取Flash文件
javascript:str='<HTML><HEAD><BASE
HREF="';str+=document.URL;str+='"></HEAD><BODY><br>/n';c=document.all;for(i=0;i<c.length;i++){o=c[i];if(o.tagName!="OBJECT")continue;sih=o.innerHTML;nd=document.createDocumentFragment();nd.appendChild(document.createElement('<bod></body>'));nd.firstChild.outerHTML=sih;no=document.createElement(nd.firstChild.outerHTML);document.body.appendChild(no);str+='<a
href="';str+=no.src;str+='">';str+=no.src;str+='</a><br>/n';};str+='</BODY></HTML>';document.write(str);
背景音乐文件
javascript:str='<HTML><HEAD><BASE
HREF="';str+=document.URL;str+='"></HEAD><BODY><br>/n';c=document.all;for(i=0;i<c.length;i++){o=c[i];if(o.tagName!="BGSOUND")continue;str+='<a
href="';str+=o.src;str+='">';str+=o.src;str+='</a><br>/n';};str+='</BODY></HTML>';document.write(str);
获取图像文件
1(图像)
javascript:z=1;strUrl='';str='';function
getImg(){if(strUrl!=''){str+=(z++);str+='. <IMG
SRC="';str+=strUrl;str+='"><br><br>/n';};};c=document.images;for(i=0;i<c.length;i++){o=c[i];strUrl=o.src;getImg();};strUrl=document.body.background;getImg();c=document.all;for(i=0;i<c.length;i++){o=c[i];if(o.tagName=='TABLE'||o.tagName=='TD'){strUrl=o.background;getImg();};if(o.tagName=='AREA'){strUrl=o.href;getImg();};};document.write(str);
2(地址)
javascript:z=1;strUrl='';str='';function
getImg(){if(strUrl!=''){str+=(z++);str+='. <a
href="';str+=strUrl;str+='">';str+=strUrl;str+='</a><br>/n';};};c=document.images;for(i=0;i<c.length;i++){o=c[i];strUrl=o.src;getImg();};strUrl=document.body.background;getImg();c=document.all;for(i=0;i<c.length;i++){o=c[i];if(o.tagName=='TABLE'||o.tagName=='TD'){strUrl=o.background;getImg();};if(o.tagName=='AREA'){strUrl=o.href;getImg();};};document.write(str);
frame页面
第一层frame进行检查
javascript:str='<HTML><HEAD><BASE
HREF="';str+=document.URL;str+='"></HEAD><BODY><br>/n';c=document.all;for(i=0;i<c.length;i++){o=c[i];if(o.tagName!='IFRAME'&&o.tagName!='FRAME')continue;str+=o.tagName;str+='
: <a href="';str+=o.src;str+='">';if(o.name=='')str+=o.src;else
str+=o.name;str+='</a><br>/n';};str+='</BODY></HTML>';document.write(str);
显示全部嵌套frame
javascript:str='';function
getFrame(c,i,j){for(i=0;i<c.length;i++){o=c[i];for(k=0;k<j;k++)str+=' ';str+='<a
href="';str+=o.location;str+='">';if(o.name!='')str+=o.name;else
str+=o.location;str+='</a><br>/n';no=o.document.frames;if(no.length>0)getFrame(no,0,j+1)};};getFrame(document.frames,0,0);document.write(str);