1.自动弹出“设为首页”代码 <BODY leftmargin="0" topmargin="0" onMouseOver="if (style.behavior==‘‘){style.behavior=‘url(#default#homepage)‘setHomePage(‘http://rjlcdh.home.‘)}"> 2. 将本站设为首页: <!--[if IE]> <a style="cursor:hand" HREF onClick="this.style.behavior=‘url(#default#homepage)‘this.setHomePage(‘http://rjlcdh.home.);">设为首页</a> <![endif]-->
3. 将本站加入收藏夹: <a href="javascript:window.external.Addfavorite(‘ http://www.‘,‘中国娱乐帝国‘)">加入收藏夹</a> 4.弹出窗口的制作 用户可在自定义区块中加入如下代码: <script LANGUAGE="JavaScript"> <!-- window.open ("http://www.", "win_name", "height=170, width=300, toolbar=no,menubar=no, scrollbars=no, resizable=no, location=no, status=no, top=100" ; //--> </script> 注: url代表弹出窗口的地址 win_name可以替换为其它窗口名称 height代表弹出窗口的高度 width代表弹出窗口的宽度 toolbar代表工具栏,no表示没有工具栏,yes为有工具栏 menubar代表菜单栏,no表示不显示菜单,用户也可以用yes scrollbars代表滚动条,no表示没有滚动条,yes为有滚动条,也可以用auto resizable代表是否可以缩放弹出窗口 location代表地址栏 status代表关态栏 top代表窗口距浏览器上部的距离 5.IP查询代码,来源地显示代码 IP查询代码 : <form action=http://www1./ip/indexw.php method=post target="search" onsubmit="window.open(‘‘,‘search‘,‘width=450, height=400, scrollbars=yes‘);"> 欲查询IP:<input onMouseOver="this.focus()" onblur="if (this.value ==‘‘) this.value=‘请输入IP地址‘" onFocus="this.select()" onClick="if (this.value==‘请输入IP地址‘) this.value=‘‘" type="text" name="ip" size="13" value=‘请输入IP地址‘> <input type="submit" name="sub" value="查询"> </FORM>
常用类 普通代码
--常用一 脚本1:进入主页以后自动播放声音
<embed src="pnm://mstong.net/mstong.rm" hidden=true autostart=true loop=true>
脚本2:进入主页后自动最大化,省的再去自己点击了 <script> self.moveTo(0,0) self.resizeTo(screen.availWidth,screen.availHeight) </script>
脚本3:显示现在时间的脚本 <script language=vbscript>document.write now</script>
脚本4:显示最后修改时间的脚本 <script>document.write(document.lastModified)</script>
脚本5:设为首页,加为收藏,加入频道,启动outlook发信 <a style="cursor:hand" onclick="this.style.behavior=‘url(#default#homepage)‘ this.setHomePage(‘http://www.);">">设为首页</a>
<a style="cursor:hand" onclick="window.external.AddFavorite(location.href,document.title);">加入收藏</a>
<a href="/javascript:window.external.addChannel"("typhoon.cdf">加入频道</a>
<a href="mailto:suishuoshuo@163.com">与我联系</a>
脚本6:状态栏动态显示现在时间 <script> function see(){ window.setTimeout("see()",1000); today = new Date(); self.status = today.toString(); } </script> <body onload=see()>
脚本7:关闭窗口的脚本 <a href="/javascript:close"()>[关闭窗口]</a>
脚本8:按下F12键,直接返回首页 <script>function look(){ if(event.keyCode==123){document.location.href=‘http://www.‘} } if(document.onkeydown==null) {document.onkeydown=look} </script>
脚本9:后退,刷新,前进 <input type=button value=后退 onclick=history.go(-1)>
<input type=button value=刷新 onclick=history.go(-0)>
<input type=button value=前进 onclick=history.go(+1)>
脚本10:设定时间弹出窗口,4000=4秒,当然你可以自定义 <script>function l() { window.open(" http://www. ","name","width=500,height=150,border=0" } setTimeout("l()",4000) </script>
常用二
一:颜色代码 如果你想使用某种颜色,取得它的颜色值即可。比如,您想改变某些文字的颜色,您可以使用下面的代码:<font color=#ffc060 size=2>改变#符号后的代码即可改变颜色</font> 000000 000020 000040 000060 000080 0000a0 0000c0 0000ff 008000 008020 008040 008060 008080 0080a0 0080c0 0080ff 00ff00 00ff20 00ff40 00ff60 00ff80 00ffa0 00ffc0 00ffff c00000 c00020 c00040 c00060 c00080 c000a0 c000c0 c000ff ff0000 ff0020 ff0040 ff0060 ff0080 ff00a0 ff00c0 ff00ff
二:文字加粗 倾斜的代码 ◆文字加粗的代码是: <b>你好</b> ◆文字倾斜的代码是: <i>你好!</i> ◆底线字:<u></u>
三:文字链接代码 如果您想点击某处文字会连接到另外一个网页的效果,这是超链接,代码是这样: <a href="网站地址";>中国娱乐帝国</a>如果要点了这个文字以后重新打开一个窗口的话,代码是:<a href="http://www.";; target="_blank">中国娱乐帝国</a> 四:在网站上放图片的代码 如果你看到一个好看的图片想放到网站上,代码是这样的: <img src="http://suishuo./xfile.php?xname=F1H1701&fname=/logo/261482_%D3%E9%C0%D6%B5%DB%B9%FAlogo.gif"; width="150" height="100"> 后面的数字调节图片的尺寸大小。
五:图片链接代码 如果要点一下图片就能打开一个网站的链接代码是这样的: <a href="500){this.resized=true;this.style.width=500;}">500)this.style.width=500;">http://";><img src="http://suishuo./xfile.php?xname=F1H1701&fname=/logo/261482_%D3%E9%C0%D6%B5%DB%B9%FAlogo.gif"; width="150" height="100"></a> 如果要点一下图片就能打开一个网站的链接,并且重新打开一个窗口。代码是这样的: <a href="http://www.";; target="_blank"><img src="http://suishuo./xfile.php?xname=F1H1701&fname=/logo/261482_%D3%E9%C0%D6%B5%DB%B9%FAlogo.gif"; width="150" height="100"></a>上面的数字都能调节图片尺寸大小。
六:换行代码 如果你想换行,直接用Enter键是不行的,需要在您想换行的位置输入<br> ,这样就会分成两行显示 ,整个网站看起来也不会是一大片了,而是段落分明。
七:文字移动的代码是 <marquee>这里写文字http://www.</marquee> 八:移动图片的代码 <marquee><img src="500){this.resized=true;this.style.width=500;}">500)this.style.width=500;">http://es.tom.com/images/2002/gamemm/0604/s/36.jpg";><img src="500){this.resized=true;this.style.width=500;}">500)this.style.width=500;">http://es.tom.com/images/2002/gamemm/0604/s/13.jpg";><img src="http://es.tom.com/images/2002/gamemm/0604/s/30.jpg";><marquee> 把里面的图片地址换成你的就行 想多放一个图片就按照格式在中间插入: <img src="http://es.tom.com/images/2002/gamemm/0604/s/13.jpg";> 里面的图片地址自己定。
九:背景音乐的代码 如果想在你的网站上放上一段好听的背景音乐,代码是: <bgsound src="http:///xxx.mid";loop=10> <bgsound src="http://www./midi/music.asp?id=3073";loop=30> 里面的背景音乐地址你能自己替换。 前面的是音乐地址,一般都以mid或者mp3的形式结尾 后面的数字是播放次数。 http://www.i/midi/ 这个网站都有好的背景音乐
十:在网站中插入一个flash动画的代码是 <embed width=200 height=200 src="http://suishuo./xfile.php?xname=F1H1701&download=1&fname=474465_sex1314.swf";> 里面的动画地址换成你的.动画地址都要以swf#
|