网页的HTML基本代码
贴图:<img src="图片地址">; 加入连接:<a href="所要连接的相关地址">写上你想写的字</a>;
在新窗口打开连接:<a href="相关地址" target="_blank">写上要写的字</a>;
移动字体(走马灯):<marquee>写上你想写的字</marquee>; 字体加粗:<b>写上你想写的字</b>
字体斜体:<i>写上你想写的字</i>; 字体下划线: <u>写上你想写的字</u>;
字体删除线: <s>写上你想写的字</s>;字体加大: <big>写上你想写的字</big>;
字体控制大小:<h1>写上你想写的字</h1>(其中字体大小可从h1-h5,h1最大,h5最小);
更改字体颜色:<font color="#value">写上你想写的字</font>(其中value值在000000与ffffff(16位进制)之间;消除连接的下划线:<a href="相关地址" style="text-decoration:none">写上你想写的字</a>;
贴音乐:<embed src="音乐地址" width="宽度" height="高度" autostart=false>;
贴flash: <embed src="flash地址" width="宽度" height="高度">;
贴影视文件:<img dynsrc="文件地址" width="宽度" height="高度" start=mouseover>;
换行:<br>; 段落:<p>段落</p>;原始文字样式:<pre>正文</pre>;换帖子背景:<body background="背景图片地址">; 固定帖子背景不随滚动条滚动:<body background="背景图片地址" body bgproperties=fixed>;
定制帖子背景颜色:<body bgcolor="#value">(value值见10); 帖子背景音乐:<bgsound="背景音乐地址" loop=infinite>; 贴网页:<iframe src="相关地址" width="宽度" height="高度"></iframe>
以下代码是让滚动文字字幕的代码:<marquee scrollamount=3 direction=up height=50>
<center><font face=黑体 color=blue size=5><b>文字一<br><br>文字二<br><br>文字三<br><br>文字四<br><br>文字五</b></font> <br><br></center></marquee><marquee >里面的参数修改一下,效果将不一样,这里仅提醒一下direction参数,可以改为向下(down)、向左(left)和向右(right)。(网上搜集)
自定义鼠标代码
<style type=text/css>
a:hover {cursor:url(‘http:///ycff/jan.cur‘)}
BODY {cursor:url(‘http:///ycff/yc.cur‘)}
</style>
投后广告代码
<script type="text/javascript">
window.open(‘1.htm‘,‘eachnet‘,‘toolbar=0‘);
setTimeout("focus();",5);
</script>
支持多种格式视频及音频播放代码(wma,wmv,mp3,avi,swf,及rm,rmvb等等)
<EMBED src=http://bbs./mymusic/timi/031206.rm width=400 height=300 type=application/vnd.rn-realmedia AUTOSTART="true" ShowStatusBar="true"> // 说明:autostart="true" 为自动播放 true 改 false 则手动播放
强制更改网页标题代码-网页放入框架一样显示的标题
<head>
<script language=javascript>top.document.title="阳春非凡-http:///-WEB编程开发常用的代码";</script>
</head>
飘浮在最前面的浮动广告
<SCRIPT language=JavaScript1.2>
<!--
//1) specify path to image//ͼƬµÄÂ?¤¾¶
var imagepath="http:///ycff/logo1.gif"
//2) specify image dimensions//ͼƬµÄ´¨?С
var imagewidth=88
var imageheight=31
//3) change this to adjust speed (lower is slower)//ËÙ¶È
var speed=3;
//4) configure what should happen when user clicks on image
//A value of "dismiss" will dismiss it, while a URL will cause the browser to navigate to it
var imageclick="http://www."
//5) Finally, configure when the image should automatically disappear, in seconds (0=perpetual)
var hideafter=0
////No editing required beyond this point/////////////////
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>
1.弹启一个全屏窗口
<html>
<body onload="window.open(‘http://‘,‘example01‘,‘fullscreen‘);">;
<b>www.e3i5.com</b>
</body>
</html>
2.弹启一个被F11化后的窗口
<html>
<body onload="window.open(‘‘http://‘,‘example02‘,‘channelmode‘);">;
<b>www.e3i5.com</b>
</body>
</html>
3.弹启一个带有收藏链接工具栏的窗口
<html>
<body onload="window.open(‘http://‘,‘example03‘,‘width=400,height=300,directories‘);">
<b>www.e3i5.com</b>
</body>
</html>
4.网页对话框
<html>
<SCRIPT LANGUAGE="javascript">
<!--
showModalDialog(‘http:///ycff/open.htm‘,‘example04‘,‘dialogWidth:400px;dialogHeight:300px;
dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes‘)
//-->
</SCRIPT>
</body>
</html>
<html>
<SCRIPT LANGUAGE="javascript">
<!--
showModelessDialog(‘http:///ycff/open.htm‘,‘example05‘,‘dialogWidth:400px;dialogHeight:300px;
dialogLeft:200px;dialogTop:150px;center:yes;help:yes;resizable:yes;status:yes‘)
//-->
</SCRIPT>
</body>
</html>
参数说明
showModalDialog()或是showModelessDialog() 来调用网页对话框,至于showModalDialog()与showModelessDialog()的区别,
在于showModalDialog()打开的窗口(简称模式窗口),置在父窗口上,必须关闭才能访问父窗口(建议尽量少用,以免招人反感);
showModelessDialog()(简称无模式窗口),打开后不必关闭也可访问父窗口打开的窗口。
dialogHeight: iHeight 设置对话框窗口的高度。
dialogWidth: iWidth 设置对话框窗口的宽度。
dialogLeft: iXPos 设置对话框窗口相对于桌面左上角的left位置。
dialogTop: iYPos 设置对话框窗口相对于桌面左上角的top位置。
center: {yes | no | 1 | 0 } 指定是否将对话框在桌面上居中,默认值是“yes”。
help: {yes | no | 1 | 0 } 指定对话框窗口中是否显示上下文敏感的帮助图标。默认值是“yes”。
resizable: {yes | no | 1 | 0 } 指定是否对话框窗口大小可变。默认值是“no”。
status: {yes | no | 1 | 0 } 指定对话框窗口是否显示状态栏。对于非模式对话框窗口,默认值是“yes”;
对于模式对话框窗口,默认值是 “no”。
定义打开网页时起始窗口的大小
<script for="window" event="onload">
window.resizeTo(500,300)
</script>
随机数:
<%randomize%>
<%=(int(rnd()*n)+1)%>
查询数据时得到的记录关键字用红色显示:
replace(RS("字段X"),searchname,"<font color=#FF0000>" & searchname & "</font>")
通过asp的手段来检查来访者是否用了代理
<% if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器,"& _
"真实的IP为"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")
end if
%>
判断上一页的来源
request.servervariables("HTTP_REFERER")
javascript: document.referrer
清除缓存,重新加载页面
<%response.expires = 0
response.expiresabsolute = now() - 1
response.addHeader "pragma","no-cache"
response.addHeader "cache-control","private"
Response.cachecontrol = "no-cache"
%>
检索并删除数据库里的重复记录
conn.execute("delete from table where id not in (select distinct from table)")
文件删除函数 <%
‘文件删除函数
function deletefile(filename)
if filename<>"" then
set fso=server.CreateObject("scripting.filesystemobject")
if fso.FileExists(filename) then
fso.DeleteFile filename
else
Response.Write "<script>alert(’该文件不存在’);</script>"
end if
end if
end function
strfile=server.MapPath("fileName")
deletefile(strfile)
%>
ASP字数计算函数 <%
Function WordCount(strInput)
Dim strTemp
strTemp = Replace(strInput, vbTab, " ")
strTemp = Replace(strTemp, vbCr, " ")
strTemp = Replace(strTemp, vbLf, " ")
‘ 删除字首字尾空格
strTemp = Trim(strTemp)
‘ 替换为一个空格
Do While InStr(1, strTemp, " ", 1) <> 0
strTemp = Replace(strTemp, " ", " ")
Loop
WordCount = UBound(Split(strTemp, " ", -1, 1)) +1
End Function
%>
全正则的检测IP是否合法的函数 function checkIP2(sIPAddress)
{
var exp=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
var reg = sIPAddress.match(exp);
var ErrMsg="你输入的是一个非法的IP地址段!\nIP段为::xxx.xxx.xxx.xxx(xxx为0-255)!"
var Msg="你输入的是一个合法的IP地址段!"
if(reg==null)
{
alert(ErrMsg);
}
else
{
alert(reg);
}
}
关闭子窗口时刷新父窗口 在子窗口
<script language="javascript">
window.opener.location="父窗口页面"
window.close()
</script>
文本框输入限制:
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>
小写英文:<xmp style= "display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^[a-z]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[a-z]*$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^[a-z]*$/, event.dataTransfer.getData(‘Text‘))"
style="ime-mode:Disabled"
><br>
大写英文:<xmp style= "display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^[A-Z]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[A-Z]*$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^[A-Z]*$/, event.dataTransfer.getData(‘Text‘))"
style="ime-mode:Disabled">
<br>
任意数字:<xmp style="display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData(‘Text‘))"
style="ime-mode:Disabled"
><br>
限2位小数:<xmp style="display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData(‘Text‘))"
style="ime-mode:Disabled"
> 如: 123.12<br>
日 期:<xmp style="display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^\d{1,4}([-\/](\d{1,2}([-\/](\d{1,2})?)?)?)?$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d{1,4}([-\/](\d{1,2}([-\/](\d{1,2})?)?)?)?$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^\d{1,4}([-\/](\d{1,2}([-\/](\d{1,2})?)?)?)?$/, event.dataTransfer.getData(‘Text‘))"
style="ime-mode:Disabled"
> 如: 2002-9-29<br>
任意中文:<xmp style="display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[\u4E00-\u9FA5]*$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^[\u4E00-\u9FA5]*$/, event.dataTransfer.getData(‘Text‘))"
><br>
部分英文:<xmp style="display:inline"> </xmp>
<input onkeypress = "return regInput(this, /^[a-e]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[a-e]*$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^[a-e]*$/, event.dataTransfer.getData(‘Text‘))"
style="ime-mode:Disabled"
> 范围: a,b,c,d,e<br>
部分中文:<xmp style="display:inline"> </xmp>
<script language=javascript>
function checkChinese(oldLength, obj)
{
var oTR = window.document.selection.createRange()
var reg = /[^一二三四五六七八九十]/g
oTR.moveStart("character", -1*(obj.value.length-oldLength))
oTR.text = oTR.text.replace(reg, "")
}
</script>
<input onkeypress="return false" onkeydown="setTimeout(‘checkChinese(‘+this.value.length+‘,‘+this.uniqueID+‘)‘, 1)"
onpaste = "return regInput(this, /^[一二三四五六七八九十]*$/, window.clipboardData.getData(‘Text‘))"
ondrop = "return regInput(this, /^[一二三四五六七八九十]*$/, event.dataTransfer.getData(‘Text‘))"
> 范围: 一二三四五六七八九十<br>
不能点右键,不用CTRL+A,不能复制作!
<body oncontextmenu="window.event.returnvalue=false"
onkeypress="window.event.returnvalue=false"
onkeydown="window.event.returnvalue=false"
onkeyup="window.event.returnvalue=false"
ondragstart="window.event.returnvalue=false"
onselectstart="event.returnvalue=false">
</body>
显示状态拦固定文字:
放在body前
<base onmouseover="window.status=‘这里是Goaler的Blog系统,欢迎访问‘;return true">
用键盘打开网页 <script language=javascript>
document.onkeydown=gopage
var add="Admin/AddArticle.asp"
var logon="Admin/Logon.asp"
function gopage() {
if (event.keyCode==13) location=add
if (event.keyCode==38) location=logon
}
</script>
根据内容自动调整iframe高度 有时为了方便使用Iframe,但被潜入的页面长度不是固定的,显示滚动条不仅影响美观还对用户操作带来不便,自动调整高度可以解决这个问题。^_^
<SCRIPT LANGUAGE="JavaScript">
function f_frameStyleResize(targObj){
var targWin = targObj.parent.document.all[targObj.name];
if(targWin != null) {
var HeightValue = targObj.document.body.scrollHeight
if(HeightValue < 600){HeightValue = 600} //不小于600
targWin.style.pixelHeight = HeightValue;
}
}
function f_iframeResize(){
bLoadComplete = true; f_frameStyleResize(self);
}
var bLoadComplete = false;
window.onload = f_iframeResize;
</SCRIPT>
禁止页面正文内容被选取
<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return
false"onmouseup="document.selection.empty()">
消除ie6自动出现的图像工具栏,设置 GALLERYIMG属性为false或no .
<IMG SRC="mypicture.jpg" HEIGHT="100px" WIDTH="100px" GALLERYIMG="no">
防止点击空链接时,页面往往重置到页首端。
代码“javascript:void(null)”代替原来的“#”标记
如何避免别人把你的网页放在框架中
<script language=“javascript”><!--if (self!=top){top.location=self.location;} -->< /script>
页面定时刷新
<meta http-equiv="Refresh" content="秒" >
页面定时转向新的地址
<meta http-equiv="refresh" content="秒;URL=url">
关闭窗口,这个是不会弹出提示直接关的:
把如下代码加入<body>区域中
<OBJECT id=closes type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Close">
</object>
<script language="javascript">function shutwin(){closes.Click();return;}</script>
<a href="javascript:shutwin();">关闭本窗口</a>
有时候好不容易写出来的程序代码被别人抄去,心里一定不好受。这还是小事,但如果在我们的源代码中有一些不希望让别人知道的内容,比如密码、Action的指向等,这些一旦被人利用,那后果有时是不堪设想的。而网页加密就是我们现在需要解决的问题。下面就我在网页制作中的一些经验向大家介绍一些简单的防范方法。
禁止右键
看到这里大家一定会想,这招有很多人介绍过了,而且破解的方法也有很多。但我这里要说的是另一种方法,而且我试了很多方法都没有能破解。具体如下:
<html>
<head>
<script>
function stop(){
alert("试试能破解吗?");
return false;
}
document.oncontextmenu=stop;
</script>
<boyd>你可以按右键、shift+F10和右ctrl左边的那个键试试!看能不能解。^_^</body>
大家试试,看能不能破解!你可以将alert("试试能破解吗?");这句去掉,这样当按右键时就什么反应也没有了,就好像没有右键功能一样。
TIME: 2006-3-24 3:56:46 IP: *.*.*.*
http://www.
本站出售永硕网络硬盘靓号!不买也来看看,呵! 管理 | 主页
编辑帖子
帖子评价
单帖屏蔽
删除帖子 ycff
等级: 荣誉CEO
帮派:无帮无派
发帖: 920
积分: 10819
状态:
注册: 2006-1-23
第 1 楼
禁示查看源代码
我们已经禁了右键,但从"查看"菜单下的"源文件"中同样可以看到源代码,下面我们就来解决这个问题:
其实这只要使用一个含有<frame></frame>标记的网页便可以达到目的。
<frameset>
<frame src="你要保密的文件的URL">
</frameset>
这样当有人使用"查看"下的"源文件"的时候,看到的将是上面的那段代码,而你真正的文件又躲过一劫。
禁示另存为
通过上面的两步好像你的源代码已经安全了,但别忘了,别人还可以将你的页面保存下来,再慢慢分析。不过别担心,下面我们来解决这个问题。
在你要保密的网页中加入以下代码:
<noscript><iframe src="*.htm"></iframe></noscript>
彻底屏蔽右键方法。
<body oncontextmenu="return false">
双击页面后自动滚屏,单击后停止。
<SCRIPT language=javascript>
var currentpos,timer;
function initialize()
{ timer=setInterval("scrollwindow()",16); }
function sc(){
clearInterval(timer);
}
function scrollwindow()
{currentpos=document.body.scrollTop;
window.scroll(0,++currentpos);
if (currentpos != document.body.scrollTop)
sc();
}
document.onmousedown=sc
document.ondblclick=initialize
</script>
设定脚本出错能继续运行
<script language="javascript">
function KillError()
{
return false;
}
window.onerror=KillError;
</script>
将彻底屏蔽鼠标右键
oncontextmenu="window.event.returnvalue=false"
可用于Table
<table border oncontextmenu=return(false)><td>no</table>
取消选取、防止复制
<body onselectstart="return false">
不准粘贴
onpaste="return false"
防止复制
oncopy="return false;" oncut="return false;"
IE地址栏前换成自己的图标
<link rel="Shortcut Icon" href="favicon.ico">
可以在收藏夹中显示出你的图标
<link rel="Bookmark" href="favicon.ico">
关闭输入法
<input style="ime-mode:disabled">
永远都会带着框架
<script language="javascript"><!--
if (window == top)top.location.href = "frames.htm";
//frames.htm为框架网页
// -->
</script>
防止被人frame
<SCRIPT LANGUAGE=javascript><!--
if (top.location != self.location)
top.location=self.location;
// -->
</SCRIPT>
怎样通过asp的手段来检查来访者是否用了代理
<% if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器," & "真实的IP为 "&Request.ServerVariables("HTTP_X_FORWARDED_FOR")
end if
%>
取得控件的绝对位置
//javascript
<script language="javascript">
function getIE(e){
var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;
}
alert("top="+t+"nleft="+l);
}
</script>
//VBScript
<script language="VBScript">
<!--
function getIE()
dim t,l,a,b
set a=document.all.img1
t=document.all.img1.offsetTop
l=document.all.img1.offsetLeft
while a.tagName<>"BODY"
set a = a.offsetParent
t=t+a.offsetTop
l=l+a.offsetLeft
wend
msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
end function
-->
</script>
光标是停在文本框文字的最后
<script language="javascript">
function cc()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart(‘character‘,e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" onfocus="cc()">
判断上一页的来源
asp:
request.servervariables("HTTP_REFERER")
javascript:
document.referrer
最小化、最大化、关闭窗口 按钮
<object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Minimize"></object>
<object id=hh2 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Maximize"></object>
<OBJECT id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" value="Close"></OBJECT>
<input type=button value=最小化 onclick=hh1.Click()>
<input type=button value=最大化 onclick=hh2.Click()>
<input type=button value=关闭 onclick=hh3.Click()>
本例适用于IE
记录并显示网页的最后修改时间
<script language=javascript>
document.write("最后更新时间: " + document.lastModified + "")
</script>
2秒后关闭当前页
<script language="javascript">
<!--
setTimeout(‘window.close();‘,2000);
-->
</script>
2秒后载入指定网页
<head>
<meta http-equiv="refresh" content="2;URL=http://你的网址">
</head>
添加到收藏夹
<Script Language="javascript">
function bookmarkit()
{
window.external.addFavorite(‘http://你的网址‘,‘你的网站名称‘)
}
if (document.all)document.write(‘<a href="#" onClick="bookmarkit()">加入收藏夹</a>‘)
</Script>
禁止鼠标右键的动作
<Script Language = "javascript">
function click() { if (event.button==2||event.button==3)
{
alert(‘禁止鼠标右键‘);
}
document.onmousedown=click // -->
</Script>
或
<script language="javascript">
function click() { if (event.button==2)
{alert(‘*^_^*‘); } } document.onmousedown=click // -->
</script>
设置该页为首页
<body bgcolor="#FFFFFF" text="#000000">
<a class="chlnk" style="cursor:hand" HREF onClick="this.style.behavior=‘url(#default#homepage)‘; this.setHomePage(‘你的网站名称);"><font color="000000" size="2" face="宋体">设为首页</font></a>
</body>
节日倒计时
<Script Language="javascript">
var timedate= new Date("October 1,2002");
var times="国庆节";
var now = new Date();
var date = timedate.getTime() - now.getTime();
var time = Math.floor(date / (1000 * 60 * 60 * 24));
if (time >= 0)
document.write("现在离"+times+"还有: "+time +"天")
</Script>
单击按钮打印出当前页
<Script Language="javascript">
if (window.print) {
document.write(‘<form>‘
+ ‘<input type=button name=print value="打印本页" ‘
+ ‘onClick="javascript:window.print()"></form>‘);
}
</Script>
单击按钮‘另存为’当前页
<input type="button" name="Button" value="保存本页" onClick="document.all.button.ExecWB(4,1)">
<object id="button" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
<embed width="0" height="0"></embed>
</object>
显示系统当前日期
<script language=javascript>
today=new Date();
function date(){
this.length=date.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=date.arguments }
var d=new date("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
document.write(
"<font color=##000000 style=‘font-size:9pt;font-family: 宋体‘> ",
today.getYear(),"年",today.getMonth()+1,"月",today.getDate(),"日",
d[today.getDay()+1],"</font>" );
</script>
不同时间段显示不同问候语 <Script Language="javascript">
var text=""; day = new Date( ); time = day.getHours( );
if (( time>=0) && (time < 7 ))
text="夜猫子,要注意身体哦! "
if (( time >= 7 ) && (time < 12))
text="今天的阳光真灿烂啊,你那个朋友呢?"
if (( time >= 12) && (time < 14))
text="午休时间。您要保持睡眠哦!"
if (( time >=14) && (time < 18))
text="祝您下午工作愉快! "
if ((time >= 18) && (time <= 22))
text="您又来了,可别和MM聊太久哦!"
if ((time >= 22) && (time < 24))
text="您应该休息了!"
document.write(text)
</Script>
水中倒影效果 <img id="reflect" src="你自己的图片文件名" width="175" height="59">
<script language="javascript">
function f1()
{
setInterval("mdiv.filters.wave.phase+=10",100);
}
if (document.all)
{
document.write(‘<img id=mdiv src="‘+document.all.reflect.src+‘"
style="filter:wave(strength=3,freq=3,phase=0,lightstrength=30) blur() flipv()">‘)
window.onload=f1
}
</script>
慢慢变大的窗口 <Script Language="javascript">
<!--
var Windowsheight=100
var Windowswidth=100
var numx=5
function openwindow(thelocation){
temploc=thelocation&, amp;, nbsp;
if
(!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById))
{
window.open(thelocation)
return
}
windowsize=window.open("","","scrollbars")
windowsize.moveTo(0,0)
windowsize.resizeTo(100,100)
tenumxt()
}
function tenumxt(){
if (Windowsheight>=screen.availHeight-3)
numx=0
windowsize.resizeBy(5,numx)
Windowsheight+=5
Windowswidth+=5
if (Windowswidth>=screen.width-5)
{
windowsize.location=temploc
Windowsheight=100
Windowswidth=100
numx=5
return
}
setTimeout("tenumxt()",50)
}
//-->
</script>
<a href="javascript:openwindow(‘http:///ycff‘)">进入</a>
鼠标指向时弹出信息框
在<body></body>之间加上如下代码: <a href onmouseover="alert(‘弹出信息!‘)">显示的链接文字</a>
随机变换背景图象(一个可以刷新心情的特效)
在<head></head>之间加上如下代码:
<Script Language="javascript">
image = new Array(4); //定义image为图片数量的数组
image [0] = ‘tu0.gif‘ //背景图象的路径
image [1] = ‘tu1.gif‘
image [2] = ‘tu2.gif‘
image [3] = ‘tu3.gif‘
image [4] = ‘tu4.gif‘
number = Math.floor(Math.random() * image.length);
document.write("<BODY BACKGROUND="+image[number]+">");
</Script>
鼠标一碰就给颜色看的链接 在<body></body>之间加上如下代码:
<p onMouseMove="anniu()">你敢碰我,我就给点颜色你看!</p>
<Script Language = "VBScript">
sub anniu
document.fgColor=int(256*256*256*rnd)
end sub
</Script>
从天而降并有幻影效果的窗口
<head>
<Script language="javascript">
function move(x) {
if(self.moveBy){
self.moveBy (0,-800);
for(i = x; i > 0; i--)
{
self.moveBy(0,3);
}
for(j = 200; j > 0; j--){ //如果你认为窗口抖动厉害,就200换成个位数
self.moveBy(0,j);
self.moveBy(j,0);
self.moveBy(0,-j);
self.moveBy(-j,0);
}
}
}
</Scrip>
<body bgColor=#ffffff onload=move(280)>
</body>
</head>
表格的半透明显示效果 在<head></head>之间加上如下代码:
<style>
.alpha{filter: Alpha(Opacity=50)} //50表示50%的透明度
</style>
在<body></body>之间加上如下代码:
<table border="1" width="100" height="62" class="alpha" bgcolor="#F2A664" >
<tr>
<td width="100%" height="62">
<div align="center">很酷吧!</div>
</td>
</tr>
</table>
锁定状态栏文字防止显示地址
<body onmouseover="self.status=‘文字‘;return true">
禁止图片下载
在<body......>这里的最后加入:
oncontextmenu="return false" ondragstart="return false" onselectstart="return false" scroll="auto"
禁止缓存
<meta http-equiv="Expires" CONTENT="0">
<meta http-equiv="Cache-Control" CONTENT="no-cache">
<meta http-equiv="Pragma" CONTENT="no-cache">
加在HEAD里
使用包含页面
加密所包含页面地址,使用工具 htmlguardian5.3.5
目前功能最强的html代码加密软件,可以保护连接和html代码被盗。1.锁右键。2.禁鼠标圈选。3.不允许离线使用。4.密码保护。5.不显示状态栏url地址。6.全代码 或 局部代码保护。7.链接跟踪。8.禁止打印(IE5+)。9.压缩代码( 未加密前)。10.可加密*.html *.js *.asp *.vbs。11.两种不同加密算法。12.加密 frameset 结构。13.某些功能支持几个不同版本的浏览器。
下载flash我的三种方法:
--查看源文件,找出flash的绝对路径,复制,在flashget(或蚂蚁)中点任务
,然后点新建下载任务即可。
--在IE的临时文件夹Temporary Internet Files里把所有的东西都删掉,然后
刷新你想要下载flash的网页,即可得到你所要的flash
--使用外部软件,推荐使用Flash Catcher,安装后只需在你所要下载的flash上右键,save即可。
让IFRAME框架内的文档的背景透明
<iframe src="about:<body style=‘background:transparent‘>" allowtransparency></iframe>
进入页面后立即自动刷新?
<meta http-equiv="refresh" content="120;url=http:///ycff">
http:///ycff,这是你自己的网址。
打开窗口即最大化(1)
<script language="javascript">
<!-- Begin
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
// End -->
</script>
打开窗口即最大化(2)
<!-- 最大化 -->
<object id=maximize type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="MAXIMIZE">
</object>
<script language="javascript">
if(self.screenLeft>1){
maximize.Click();
}
self.focus();
</script>
能隐藏IFRAME的滚动条吗?我知道的三种方法:
1. 设置iframe scrolling="no"
2. 被包含页body应用overflow:hidden
3. 被包含页的body标签加scroll="no"
加入背景音乐
<bgsound src="mid/windblue[1].mid" loop="-1"> 只适用于IE
<embed src="music.mid" autostart="true" loop="true" hidden="true">
对Netscape ,IE 都适用
嵌入网页
<iframe name="tt" src="01a.html" width="450" height="287" scrolling="Auto" frameborder="0"></iframe>
跳转
<meta http-equiv="refresh" content="3;URL=list.htm">
滚动
<MARQUEE direction=up height=146 onmouseout=start() onmouseover=stop() scrollAmount=4>
</marquee>
细线分隔线
<hr noshade size=0 color=#C0C0C0>
过度方式
<meta http-equiv="Page-Exit" content="revealTrans(Duration=3,Transition=5)">
Duration的值为网页动态过渡的时间,单位为秒。
Transition是过渡方式,它的值为0到23,分别对应24种过渡方式。如下表:
0 盒状收缩 1 盒状放射
2 圆形收缩 3 圆形放射
4 由下往上 5 由上往下
6 从左至右 7 从右至左
8 垂直百叶窗 9 水平百叶窗
10 水平格状百叶窗 11垂直格状百叶窗
12 随意溶解 13从左右两端向中间展开
14从中间向左右两端展开 15从上下两端向中间展开
16从中间向上下两端展开 17 从右上角向左下角展开
18 从右下角向左上角展开 19 从左上角向右下角展开
20 从左下角向右上角展开 21 水平线状展开
22 垂直线状展开 23 随机产生一种过渡方式
如何控制横向和纵向滚动条的显隐?
<body style="overflow-y:hidden"> 去掉x轴
<body style="overflow-x:hidden"> 去掉y轴
<body scroll="no">不显
定义本网页关键字,可以在<Head></Head>中加入如下代码: <meta name="Keywords" content="china,enterprise,business,net">
Content 中所包含的就是关键字,你可以自行设置。
这里有个技巧,你可以重复某一个单词,这样可以提高自己网站的排行位置,如:
<meta name="Keywords" content="china,china,china,china">
IE5.0 的部分快捷键:
A:打开查找功能:Ctrl+F
关闭浏览器窗口:Ctrl+W
打开地址栏下拉列表框:F4
刷 新:F5
将当前Web页保存到收藏夹列表:Ctrl+D
打开当前 IE 窗口的一个拷贝:Ctrl+N
停止下载当前网页:Esc
光标迅速移动到网页的开头:Home
光标迅速移动到网页的尾部:End
打开新的地址键入窗口:Ctrl+O
打开收藏夹:Ctrl+I
打开历史记录文件夹:Ctrl+H
打开浏览器设定的默认主页:Alt+HOME
TIME: 2006-3-24 4:06:12 IP: *.*.*.*
http://www.
本站出售永硕网络硬盘靓号!不买也来看看,呵! 管理 | 主页
编辑帖子
帖子评价
单帖屏蔽
删除帖子 ycff
等级: 荣誉CEO
帮派:无帮无派
发帖: 920
积分: 10819
状态:
注册: 2006-1-23
第 2 楼
添加到收藏夹:
<a href="javascript:window.external.addFavorite(‘http://链接‘,‘说明‘);">添加到收藏夹</a>
设为首页:
<a href=# onclick=this.style.behavior=‘url(#default#homepage)‘;this.setHomePage (‘http://链接‘);>设为首页</a>
定制浏览器地址栏前的小图标:
A:在网页的<head></head>间加入以下语句
<link rel="shortcuticon" href="http://…/icon.ico">
即可。其中 icon.ico 为 16x16 的图标文件,
颜色不要超过 16 色。
把滚动条放在浏览器窗口的左边
A:在 <body> 中加 dir=RTL,即 <body dir=RTL>。
让背景图不滚动
IE浏览器支持一个 Body 属性 bgproperties,它可以让背景不滚动:
<Body Background="图片文件" bgproperties="fixed">
删除确认:
<input type="button" name="DEL" onclick="{if(confirm(‘确认删除么?‘)){location.href=‘xxx.asp‘;}return false;}" value="ON" >
隐藏状态栏中的链接地址:
<script language="javascript">
kstatus();
function kstatus(){
self.status="GBlog () ";
setTimeout("kstatus()",0);
}
</script>
自定义指定区域的文字大小:
<div id=zoom>sdrrrrrrrrrrrrrrrrrrrrrrrrrrrrr</div>
【<A href="javascript:doZoom(16)">大</A> <A href="javascript:doZoom(14)">中</A> <A href="javascript:doZoom(12)">小</A>】
<SCRIPT language=javascript>
function doZoom(size){
document.getElementById(‘zoom‘).style.fontSize=size+‘px‘
}
</script>
Input输入框文字效果:
<input type="text" value="123456" style="FONT-size:38px;color:red;font-family:arial black">
通过层来实现渐淡淡出
<script language="javascript1.2">
function makevisible(cur,which){
if (which==0)
cur.filters.alpha.opacity=100
else
cur.filters.alpha.opacity=50
}
</script>
<div style="width:200px;height:200px;filter:alpha(opacity=50);border:1px solid #000;background:#efefef" onMouseOver="makevisible(this,0)" onMouseOut="makevisible(this,1)">
ywicc.com
</div>
网页屏保
<script language="javascript">
function screensave(){
test.value++;
if(test.value==5){
test.style.display=‘none‘;
document.all[4].bgColor=‘black‘;
}
}
function screenopen(){
test.value=0;
test.style.display=‘‘;
document.all[4].bgColor=‘‘;
}
</script>
<body onkeydown="screenopen()" onmousemove="screenopen()" onload="setInterval(‘screensave()‘,1000)">
5 秒屏保<input id="test">
让标题动态
<script>
<!--
var tx = new Array (
"◇:::::::网页制作学习园地:::::::◇欢迎您!◇",
"◆欢迎大家光临网页制作学习园地网站!◆",
"◆大量供应网页制作教材,资料,源代码,网页制作软件,相关插件光盘!◆",
"◆最可怕的敌人,就是没有坚强的信念!◆",
"◆应该让别人的生活因为有了你的生存而更加美好!◆"
);
var txcount=5;
var i=1;
var wo=0;
var ud=1;
function animatetitle()
{
window.document.title=tx[wo].substr(0, i)+"_";
if (ud==0) i--;
if (ud==1) i++;
if (i==-1) {ud=1;i=0;wo++;wo=wo%txcount;}
if (i==tx[wo].length+10) {ud=0;i=tx[wo].length;}
// if (window.document.title.length < 20 ) window.document.title=window.document.title+"-";
// if (window.document.title.length == 20 ) window.document.title=window.document.title+"]";
// if (window.document.title.length == 21 ) setTimeout("window.document.title=‘Animierte Seitentitel ‘; ",1000);
parent.window.document.title=tx[wo].substr(0, i)+"_";
setTimeout("animatetitle()",100);
}
animatetitle();
// --></script><script language="javascript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
隐去浏览器中当鼠标移到图片上跳出的工具栏
<img galleryimg="no">
或者
<head>
<meta http-equiv="imagetoolbar" content="no">
</head>
在form中只有input输入框的情况下...在这个input输入框中按enter进行提交表单
<form onsubmit="if(event.srcElement.name==‘bb‘){this.submit()}else{return false}">
<input name=a size=20>
<input type=button name=bb onclick="submit();">
</form>
删除确认
<input type="button" value="删除" onclick="{if(confirm(‘确认删除么?‘)){location.href=‘aa.asp‘;}return false;}">
或
<a href="aa.asp" onclick="{if(confirm(‘确定删除吗?‘)){return true;}return false;}">删除</a>
或
<a href="del.asp" onclick="return confirm(‘该删除操作将无法恢复!是否继续?‘)">删除</a>
返回页面顶部:
javascript:window.scroll(0,0)
离开页面时弹出警告:
<BODY onbeforeunload="checkclose()">
<SCRIPT>
function checkclose(){
event.returnvalue = "测试啊" //XXX可以改为任何文本信息也可以是空
}
</SCRIPT>
<a href="a.asp">aa</a>
1. 彻底屏蔽鼠标右键
oncontextmenu="window.event.returnvalue=false"
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. 取消选取、防止复制
<body onselectstart="return false">
3. 不准粘贴
onpaste="return false"
4. 防止复制
oncopy="return false;" oncut="return false;"
5. IE地址栏前换成自己的图标
<link rel="Shortcut Icon" href="favicon.ico">
6. 在收藏夹中显示出你的图标
<link rel="Bookmark" href="favicon.ico">
7. 关闭输入法
<input style="ime-mode:disabled">
8. 永远都会带着框架
<script language="javascript"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
// --></script>
9. 防止被人frame
<SCRIPT LANGUAGE=javascript><!--
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>
10. 网页不能被另存为
<noscript><iframe src=*.html></iframe></noscript>
11. 查看网页源代码
<input type=button value=查看网页源代码
onclick="window.location = ‘view-source:‘+ ‘http:///ycff/‘">
12.删除时确认
<a href=‘javascript:if(confirm("确实要删除吗?"))location="boos.asp?&areyou=删除&page=1"‘>删除</a>
13. 取得控件的绝对位置
//javascript
<script language="javascript">
function getIE(e){
var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;
}
alert("top="+t+"/nleft="+l);
}
</script>
//VBScript
<script language="VBScript"><!--
function getIE()
dim t,l,a,b
set a=document.all.img1
t=document.all.img1.offsetTop
l=document.all.img1.offsetLeft
while a.tagName<>"BODY"
set a = a.offsetParent
t=t+a.offsetTop
l=l+a.offsetLeft
wend
msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
end function
--></script>
14. 光标是停在文本框文字的最后
<script language="javascript">
function cc()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart(‘character‘,e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" onfocus="cc()">
15. 判断上一页的来源
javascript:
document.referrer
16. 最小化、最大化、关闭窗口
<object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Minimize"></object>
<object id=hh2 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11">
<param name="Command" value="Maximize"></object>
<OBJECT id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" value="Close"></OBJECT>
<input type=button value=最小化 onclick=hh1.Click()>
<input type=button value=最大化 onclick=hh2.Click()>
<input type=button value=关闭 onclick=hh3.Click()>
本例适用于IE
17.屏蔽功能键Shift,Alt,Ctrl
<script>
function look(){
if(event.shiftKey)
alert("禁止按Shift键!"); //可以换成ALT CTRL
}
document.onkeydown=look;
</script>
18. 网页不会被缓存
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">
19.怎样让表单没有凹凸感?
<input type=text style="border:1 solid #000000">
或
<input type=text style="border-left:none; border-right:none; border-top:none; border-bottom: 1 solid #000000"></textarea>
20.<div><span>&<layer>的区别?
<div>(division)用来定义大段的页面元素,会产生转行
<span>用来定义同一行内的元素,跟<div>的唯一区别是不产生转行
<layer>是ns的标记,ie不支持,相当于<div>
21.让弹出窗口总是在最上面:
<body onblur="this.focus();">
22.不要滚动条?
让竖条没有:
<body style=‘overflow:scroll;overflow-y:hidden‘>
</body>
让横条没有:
<body style=‘overflow:scroll;overflow-x:hidden‘>
</body>
两个都去掉?更简单了
<body scroll="no">
</body>
23.怎样去掉图片链接点击后,图片周围的虚线?
<a href="#" onFocus="this.blur()"><img src="logo.jpg" border=0></a>
24.电子邮件处理提交表单
<form name="form1" method="post" action="mailto:****@***.com" enctype="text/plain">
<input type=submit>
</form>
25.在打开的子窗口刷新父窗口
window.opener.location.reload()
26.如何设定打开页面的大小
<body onload="top.resizeTo(300,200);">
打开页面的位置<body onload="top.moveBy(300,200);">
27.在页面中如何加入不是满铺的背景图片,拉动页面时背景图不动
<STYLE>
body
{background-image:url(logo.gif); background-repeat:no-repeat;
background-position:center;background-attachment: fixed}
</STYLE>
28. 检查一段字符串是否全由数字组成
<script language="javascript"><!--
function checkNum(str){return str.match(//D/)==null}
alert(checkNum("1232142141"))
alert(checkNum("123214214a1"))
// --></script>
29. 获得一个窗口的大小
document.body.clientWidth; document.body.clientHeight
30. 怎么判断是否是字符
if (/[^/x00-/xff]/g.test(s)) alert("含有汉字");
else alert("全是字符");
31.TEXTAREA自适应文字行数的多少
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
</textarea>
32. 日期减去天数等于第二个日期
<script language=javascript>
function cc(dd,dadd)
{
//可以加上错误处理
var a = new Date(dd)
a = a.valueOf()
a = a - dadd * 24 * 60 * 60 * 1000
a = new Date(a)
alert(a.getFullYear() + "年" + (a.getMonth() + 1) + "月" + a.getDate() + "日")
}
cc("12/23/2002",2)
</script>
33. 选择了哪一个Radio
<HTML><script language="vbscript">
function checkme()
for each ob in radio1
if ob.checked then window.alert ob.value
next
end function
</script><BODY>
<INPUT name="radio1" type="radio" value="style" checked>Style
<INPUT name="radio1" type="radio" value="barcode">Barcode
<INPUT type="button" value="check" onclick="checkme()">
</BODY></HTML>
34.脚本永不出错
<SCRIPT LANGUAGE="javascript">
<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->
</SCRIPT>
35.ENTER键可以让光标移到下一个输入框
<input onkeydown="if(event.keyCode==13)event.keyCode=9">
36. 检测某个网站的链接速度:
把如下代码加入<body>区域中:
<script language=javascript>
tim=1
setInterval("tim++",100)
b=1
var autourl=new Array()
autourl[1]="www."
autourl[2]="javacool.3322.net"
autourl[3]="www.sina.com.cn"
autourl[4]="www."
autourl[5]="www.cctv.com"
function butt(){
document.write("<form name=autof>")
for(var i=1;i<autourl.length;i++)
document.write("<input type=text name=txt"+i+" size=10 value=测试中……> =》<input type=text
name=url"+i+" size=40> =》<input type=button value=GO
onclick=window.open(this.form.url"+i+".value)><br>")
document.write("<input type=submit value=刷新></form>")
}
butt()
function auto(url){
document.forms[0]["url"+b].value=url
if(tim>200)
{document.forms[0]["txt"+b].value="链接超时"}
else
{document.forms[0]["txt"+b].value="时间"+tim/10+"秒"}
b++
}
function run(){for(var i=1;i<autourl.length;i++)document.write("<img
src=http://"+autourl+"/"+Math.random()+" width=1 height=1
onerror=auto(‘http://"+autourl+"‘)>")}
run()</script>
37. 各种样式的光标
auto :标准光标
default :标准箭头
hand :手形光标
wait :等待光标
text :I形光标
vertical-text :水平I形光标
no-drop :不可拖动光标
not-allowed :无效光标
help :?帮助光标
all-scroll :三角方向标
move :移动标
crosshair :十字标
e-resize
n-resize
nw-resize
w-resize
s-resize
se-resize
sw-resize
38.页面进入和退出的特效
进入页面<meta http-equiv="Page-Enter" content="revealTrans(duration=x, transition=y)">
推出页面<meta http-equiv="Page-Exit" content="revealTrans(duration=x, transition=y)">
这个是页面被载入和调出时的一些特效。duration表示特效的持续时间,以秒为单位。transition表示使
用哪种特效,取值为1-23:
0 矩形缩小
1 矩形扩大
2 圆形缩小
3 圆形扩大
4 下到上刷新
5 上到下刷新
6 左到右刷新
7 右到左刷新
8 竖百叶窗
9 横百叶窗
10 错位横百叶窗
11 错位竖百叶窗
12 点扩散
13 左右到中间刷新
14 中间到左右刷新
15 中间到上下
16 上下到中间
17 右下到左上
18 右上到左下
19 左上到右下
20 左下到右上
21 横条
22 竖条
23 以上22种随机选择一种
39.在规定时间内跳转
<META http-equiv=V="REFRESH" content="5;URL=http:///ycff">
40.网页是否被检索
<meta name="ROBOTS" content="属性值">
其中属性值有以下一些:
属性值为"all": 文件将被检索,且页上链接可被查询;
属性值为"none": 文件不被检索,而且不查询页上的链接;
属性值为"index": 文件将被检索;
属性值为"follow": 查询页上的链接;
属性值为"noindex": 文件不检索,但可被查询链接;
属性值为"nofollow": 文件不被检索,但可查询页上的链接。
来源:http://www./bbs/Show.asp?id=1231&BoardID=28&TB=1