无提示关闭窗口
<input type="button" onClick="window.opener = 'xxx';window.close();" value="IE6最简单的无提示关闭窗口" >
javascript 预装载图片
<script language="JavaScript">
var img = new Image();
img.src = "http://community.csdn.net/images/CSDN_logo.GIF";
</script>
<body οnlοad="javascript:img1.src=img.src">
<img id=img1>
</body>
文章列表中常用的颜色交替
<style>
tr{background-color:expression((this.rowIndex%2==0)?"blue":"red");ryo:expression(οnmοuseοver=function(){this.style.backgroundColor=(this.style.backgroundColor!='gray'?'gray':((this.rowIndex%2==0)?"blue":"red"))},οnmοuseοut=function(){this.style.backgroundColor=(this.style.backgroundColor!='gray'?'gray':((this.rowIndex%2==0)?"blue":"red"))})}
</style>
<TABLE width="200" cellpadding="0" cellspacing="2" border="0" id="t1">
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
</TABLE>
网页倒过来
<style type="text/css">
<!--
body {filter:FlipH() FlipV();}
-->
</style>
修改任意WEB元素
<table id="test">
<tr>
<td>gfd</td>
<td>gfdgsfdgfs</td>
</tr>
</table>
<script language="javascript">
document.getElementById("test").outerHTML="<table><tr><td><img src='http://www.sina.com.cn/images/logo.gif'></td></tr></table>";
</script>
常用JS验证
<script language=Vbscript>
Function IsVerify(patrn,strng)
strng=Trim(strng)
Select Case patrn
Case "User" '用户名
patrn="^[a-z]{1}([a-z0-9]|[._]){2,19}$"
Case "Truename" '英文姓名
patrn="^[a-zA-Z]{1,30}$"
Case "Passwd" '密码
patrn="^(/w){6,20}$"
Case "Tel" '电话/传真
patrn="^[+]{0,1}(/d){1,3}[ ]?([-]?((/d)|[ ]){1,12})+$"
Case "Mobil" '手机
patrn="^(/d)+[-]?(/d){6,12}$"
Case "Date" '日期(格式:yyyy-mm-dd)
patrn="^[12]{1}(/d){3}[-][01]?(/d){1}[-][0123]?(/d){1}$"
Case "Email" '电子邮件
patrn="^((/w)|[-]|[.])+@(((/w)|[-])+[.])+[a-z]{2,4}$"
Case "Postalcode" '邮政编码
patrn="^[a-z0-9 ]{3,12}$"
Case "Search" '搜索关键字
patrn="^[^`~!@#$%^&*()+=|///[/]/{/}:;/'/,.<>/?]{1}[^`~!@$%^&()+=|///[/]/{/}:;/'/,.<>?]{0,19}$"
Case "Int" '整数
patrn="^[1-9]{1}[0-9]{0,5}$"
Case "Array"
patrn="^[0-9]{1}([0-9]|[/,]){0,150}$"
End Select
Dim regEx
Dim Match
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
Matches = regEx.test(strng)
IsVerify = Matches
Set regEx = Nothing
End Function
</script>
onblur事件时调用IsVerify("Email",value)
<input type="button" onClick="window.opener = 'xxx';window.close();" value="IE6最简单的无提示关闭窗口" >
javascript 预装载图片
<script language="JavaScript">
var img = new Image();
img.src = "http://community.csdn.net/images/CSDN_logo.GIF";
</script>
<body οnlοad="javascript:img1.src=img.src">
<img id=img1>
</body>
文章列表中常用的颜色交替
<style>
tr{background-color:expression((this.rowIndex%2==0)?"blue":"red");ryo:expression(οnmοuseοver=function(){this.style.backgroundColor=(this.style.backgroundColor!='gray'?'gray':((this.rowIndex%2==0)?"blue":"red"))},οnmοuseοut=function(){this.style.backgroundColor=(this.style.backgroundColor!='gray'?'gray':((this.rowIndex%2==0)?"blue":"red"))})}
</style>
<TABLE width="200" cellpadding="0" cellspacing="2" border="0" id="t1">
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
<TR><TD>1</TD></TR>
</TABLE>
网页倒过来
<style type="text/css">
<!--
body {filter:FlipH() FlipV();}
-->
</style>
修改任意WEB元素
<table id="test">
<tr>
<td>gfd</td>
<td>gfdgsfdgfs</td>
</tr>
</table>
<script language="javascript">
document.getElementById("test").outerHTML="<table><tr><td><img src='http://www.sina.com.cn/images/logo.gif'></td></tr></table>";
</script>
常用JS验证
<script language=Vbscript>
Function IsVerify(patrn,strng)
strng=Trim(strng)
Select Case patrn
Case "User" '用户名
patrn="^[a-z]{1}([a-z0-9]|[._]){2,19}$"
Case "Truename" '英文姓名
patrn="^[a-zA-Z]{1,30}$"
Case "Passwd" '密码
patrn="^(/w){6,20}$"
Case "Tel" '电话/传真
patrn="^[+]{0,1}(/d){1,3}[ ]?([-]?((/d)|[ ]){1,12})+$"
Case "Mobil" '手机
patrn="^(/d)+[-]?(/d){6,12}$"
Case "Date" '日期(格式:yyyy-mm-dd)
patrn="^[12]{1}(/d){3}[-][01]?(/d){1}[-][0123]?(/d){1}$"
Case "Email" '电子邮件
patrn="^((/w)|[-]|[.])+@(((/w)|[-])+[.])+[a-z]{2,4}$"
Case "Postalcode" '邮政编码
patrn="^[a-z0-9 ]{3,12}$"
Case "Search" '搜索关键字
patrn="^[^`~!@#$%^&*()+=|///[/]/{/}:;/'/,.<>/?]{1}[^`~!@$%^&()+=|///[/]/{/}:;/'/,.<>?]{0,19}$"
Case "Int" '整数
patrn="^[1-9]{1}[0-9]{0,5}$"
Case "Array"
patrn="^[0-9]{1}([0-9]|[/,]){0,150}$"
End Select
Dim regEx
Dim Match
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
Matches = regEx.test(strng)
IsVerify = Matches
Set regEx = Nothing
End Function
</script>
onblur事件时调用IsVerify("Email",value)