是一个htm页面,在打开的时候,要跳转到新的连接,不能打开新的页面。
这样写有问题,怎么打开都是一个新页面呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
</head>
<body>
<script language=javascript>
function document.body.onload()
{
window.open("http://www.xxx.com/a.aspx");
}
</script>
</body>
</html>
这样写有问题,怎么打开都是一个新页面呢?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>无标题页</title>
</head>
<body>
<script language=javascript>
function document.body.onload()
{
window.open("http://www.xxx.com/a.aspx");
}
</script>
</body>
</html>
解决方案 »
- .net的前途是什么
- iframe内的页面为什么在第一次加载时不显示?
- 脚本更新textbox,发现它不再保持状态,有办法吗
- 在Microsoft Visual Studio .NET 2003里,我遇到了一个问题:无法调试。无法找到 Microsoft Internet Explorer。哪位高手能帮我解答啊?
- 安装完WINDOW2003后无法运行ASPX页面
- 关于sql语句在C#中的写法
- 数据库中包含字符串判断
- 为什么droplist在页面中用droplist.items.add("1")加入去后在droplist_SelectedIndexChanged事情不能捉到其值.
- Asp.net的源程序无法在.Net中打开.提示Web访问失败.
- 关于控件得到焦点的奇怪问题
- 有人做过网站与IM结合吗?希望有做过的进来指点一二
- ASP.NET 中 PageBase都应该写哪些函数或者功能?
window.onload=function()
{
window.open( "http://www.xxx.com/a.aspx "); }
</script>
<head>
<title> 无标题页 </title>
<script language= "javascript ">
function openwindow()
{
window.open( "http://www.xxx.com/a.aspx "); }
</script>
</head>
<body onload="openwindow()">
</body>
</html>
function document.body.onload()
{
window.open( "http://www.xxx.com/a.aspx ");
}
</script> 改为
<script language=javascript>
function document.body.onload()
{
window.location.href="http://www.xxx.com/a.aspx ";
}
</script> 说明:open是打开新页,location是对本页控制
不管是open还是location都是打开新页面
怎么解决?