让英文字符串超出表格宽度自动换行
<td style="word-wrap:break-word; word-break:break-all;">

永远都会带着框架
<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>

网页将不能被另存为
<noscript><iframe src=*.html></iframe></noscript>

删除时确认
<a href='javascript:if(confirm("确实要删除吗?"))location="del.asp"'>删除</a>

不要滚动条
让竖条没有:
<body style='overflow:scroll;overflow-y:hidden'>
</body>
让横条没有:
<body style='overflow:scroll;overflow-x:hidden'>
</body>
两个都去掉?更简单了:
<body scroll="no">
</body>

鼠标划过,表格变色
<tr onmouseover="this.bgColor='red'" onmouseout="this.bgColor=''">

自动播放声音
<embed src="pnm://10.13.31.90/~kayvin/mihunji.rm" hidden=true autostart=true loop=true>

自动最大话,省的去在自己单击了
<script>
self.moveTo(0,0)
self.resizeTo(screen.availWidth,screen.availHeight)
</script>

显示现在时间
<script language=vbscript>document.write now</script>

显示最后修改时间
<script>document.write(document.lastModified)</script>

设为首页,加为收藏,加入频道,启动outlook
<a style="cursor:hand" 
onclick="this.style.behavior="url(#default#homepage)";
this.setHomePage("yourURL">设为首页</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="youEmail">与我联系</a>

状态栏动态显示现在时间
<script>
function see(){
window.setTimeout("see()",1000);
today = new Date();
self.status = today.toString();
}
</script>
<body onload=see()>

关闭窗口
<a href=javascript:close()>[关闭窗口]</a>


按下F12键,直接返回首页
<script>function look(){
if(event.keyCode==123){document.location.href=http://10.13.31.90/~kayvin/}
}
if(document.onkeydown==null)
{document.onkeydown=look}
</script>

后退,刷新,前进

<input type=button value=后退 onclick=history.go(-1)>
<input type=button value=刷新 onclick=history.go(-0)>
<input type=button value=前进 onclick=history.go(+1)>

设定时间弹出窗口,4000=4秒,当然你可以自定义

<script>function l() {
window.open("yourURL","name","width=500,height=150,border=0")
}
setTimeout("l()",4000)
</script>

屏蔽右键
<body oncontextmenu="return false;">

<script language="JavaScript">
<!--
if (window.Event)
  document.captureEvents(Event.MOUSEUP);
function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e)
{
if (window.Event)
{
  if (e.which == 2 || e.which == 3)
   return false;
}
else
  if (event.button == 2 || event.button == 3)
  {
   event.cancelBubble = true
   event.returnValue = false;
   return false;
  }
}
document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown = norightclick;  // for all others
//-->
</script>


用正则强制输入数字
<input name="id2" type="text" onkeyup='this.value=this.value.replace(/\D/gi,"")'>

禁止输入中文
<input type=text style="ime-mode: disabled ">

不允许文本框自动完成
<input autocomplete=off>

图片变灰,掠过恢复
<img src="http://community.csdn.net/images/csdn.gif" style="filter:gray" onmo ... useout="this.style.filter='gray'">

定时跳转到其它页面
<meta http-equiv="refresh" content="5;URL=http://54caizi.com">

TITLE换行
<a href=# title="第一行第二行第三行">title分行测试</a>

行背景色渐变
<table width="100%" height="100%">
<tr><td style="FILTER: progid:DXImageTransform.Microsoft.Gradient(endColorstr='#EFF3FF', startColorstr='#94B2F7', gradientType='1')" ></td></tr>
</table>
说明:
功能从startcolorstr渐变到endcolorstr
gardientType 是填充样式,具体值请自己尝试

调用其它页面
<object type="text/x-scriptlet" width="800" height="1000" data="a.htm"></object>

Iframe的常用用法
<iframe WIDTH=100% HEIGHT=240 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 allowTransparency="true" SCROLLING=no SRC='Cay/blog.asp'></iframe>