87,997
社区成员




<html>
<title>I want to prevent being redirected</title>
<body>
<a href="b.html" target="_blank">open window b</a>
</body>
<html>
<html>
<title>I will redirect opener</title>
<script language="JavaScript">
function redirect()
{
window.opener.open("http://www.163.com", '_self');
}
</script>
<body onload="redirect()">
I will redirect opener to www.163.com
</body>
<html>
function redirect()
{
var state=location.href.split('=');
if(state[1]==1)
{
window.opener.open("http://www.163.com", '_self');
}
else
{
return false;
}
}