样式控制窗口目标
代码如下:
<script>if( self == top ){top.location = "/myjs/?u=/hw/asp/jsview.asp?id=357";}</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Keywords" content="51windows.Net">
<META NAME="Author" CONTENT="haiwa">
<title>样式控制窗口目标-www.51windows.Net</title>
</head>
<body>
<script>
function test1()
{
window.open(this.href,"","");
return false
}
function test2()
{
window.open(this.href,"51windows","top=10,height=10,width=240,height=180");
return false
}
</script>
<style>
.newwin1 {haiwa:expression(this.onclick=test1)}
.newwin2 {haiwa:expression(this.onclick=test2)}
</style>
<a href="about:blank" target="_blank">新窗口</a> <br>
<a href="about:blank" class=newwin1>还是新窗口</a> <br>
<a href="about:blank" class=newwin2>仍是新窗口</a><br>
有什么不同呢?看源文件
</body>
</html>
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand;z-index:100000;font:menu;">
<A href="http://www.51windows.Net/?js" target=_blank><FONT color=red> My Js Collection!</FONT></A><br><input type="button" name="Button" value="源代码" onClick= 'window.location = "view-source:" + window.location.href'><SCRIPT LANGUAGE="JavaScript" src="/log/sitelog.asp"></SCRIPT></div>
<!-- 海娃@haiwa@blueidea.com@无忧视窗@http://www.51windows.net -->
<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div>


