[08-27] 分享几个平时收藏的代码,希望对大家有用
这些代码要用的时候就找不到,所以平时我都收藏着,不然找代码又一大堆病毒
大家看能用的就收藏一下,刚才整理硬盘找出来的
把代码复制到一个htm下保存就有效果了
HTML代码转换成JS脚本↓- <TABLE class=link01 cellSpacing=0 cellPadding=0 width="100%" border=0>
- <TBODY>
- <TR>
- <TD bgColor=#bcccdf height=20>
- <DIV align=center>HTML代码转换成JS脚本</DIV></TD></TR>
- <TR>
- <TD align=middle>
- <DIV align=center>请将html代码复制到下面框中: <BR><TEXTAREA id=oSource onpropertychange=change() rows=10 cols=100></TEXTAREA>
- <BR>下面框中是相应的JS代码: <BR><TEXTAREA id=oResult ondblclick='this.select();oResult.createTextRange().execCommand("Copy")' title=双击复制 rows=10 cols=100></TEXTAREA>
- </TEXTAREA><BR>
- <SCRIPT language=JavaScript>
- function change(){
- oResult.value="document.writeln(\""+oSource.value.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/\'/g,"\\\'").replace(/\"/g,"\\\"").split('\r\n').join("\");\ndocument.writeln(\"")+"\")"
- } </SCRIPT>
- </DIV></TD></TR></TBODY></TABLE>
- </BODY>
- </HTML>
复制代码 单空间双域名↓- <%if Request.ServerVariables("SERVER_NAME")="aaa.com" then '第一个输入的网址
- response.redirect "flash/index.asp" '将它转发到相应的文件夹
- else%>
- <%end if%>
- <%if Request.ServerVariables("SERVER_NAME")="www.aaa.com" then
- response.redirect "flash/index.asp"
- else%>
- <%end if%>
- <%if Request.ServerVariables("SERVER_NAME")="bbb.com" then '第二个输入的网址
- response.redirect "cd/index.asp" '将它转发到相应的文件夹
- else%>
- <%end if%>
- <%if Request.ServerVariables("SERVER_NAME")="www.bbb.com" then
- response.redirect "cd/index.asp"
- else%>
- <%end if%>
复制代码 超强力浮动图片↓- <script type="text/javascript">
- var imagepath="http://www.171zz.com/images/default/logo.gif"
- var imagewidth=198 //这两行写图片的大小
- var imageheight=158
- var speed=2;
- var imageclick="http://www.171zz.com" //这里写点击图片连接到的地址
- var hideafter=0
- var isie=0;
- if(window.navigator.appName=="Microsoft Internet Explorer"&&window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5,window.navigator.appVersion.indexOf("MSIE")+8)>=5.5) {
- isie=1;
- }
- else {
- isie=0;
- }
- if(isie){
- var preloadit=new Image()
- preloadit.src=imagepath
- }
- function pop() {
- if(isie) {
- x=x+dx;y=y+dy;
- oPopup.show(x, y, imagewidth, imageheight);
- if(x+imagewidth+5>screen.width) dx=-dx;
- if(y+imageheight+5>screen.height) dy=-dy;
- if(x<0) dx=-dx;
- if(y<0) dy=-dy;
- startani=setTimeout("pop();",50);
- }
- }
- function dismisspopup(){
- clearTimeout(startani)
- oPopup.hide()
- }
- function dowhat(){
- if (imageclick=="dismiss")
- dismisspopup()
- else
- window.open(imageclick);
- }
- if(isie) {
- var x=0,y=0,dx=speed,dy=speed;
- var oPopup = window.createPopup();
- var oPopupBody = oPopup.document.body;
- oPopupBody.style.cursor="hand"
- oPopupBody.innerHTML = '<IMG SRC="'+preloadit.src+'">';
- oPopup.document.body.onmouseover=new Function("clearTimeout(startani)")
- oPopup.document.body.onmouseout=pop
- oPopup.document.body.onclick=dowhat
- pop();
- if (hideafter>0)
- setTimeout("dismisspopup()",hideafter*1000)
- }
- </script>
复制代码 全站顶部广告栏调用↓- <title>域名..Domain Name...</title>
- </head>
- <frameset rows="65,*" cols="*" framespacing="0" frameborder="no" border="0">
- <frame src="up.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" />
- <frame src="http://www.171zz.com" name="mainFrame" id="mainFrame" />
- </frameset>
- <noframes><body>
- </body>
- </noframes></html>
复制代码 |
-
1
评分人数
-