在javascript中不起作用?
我试过用一个网页,URL是http://192.168.1.20/aaa.html,
内容如下:
<HEAD>
<base href="http://192.168.1.113/">
<TITLE>欢迎</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<script language="JavaScript">
<!--
var popup = null;
var over = "Launch Pop-up Navigator";
popup = window.open('', 'popupnav', 'width=300,height=200,resizable=0,scrollbars=auto');
if (popup != null) {
if (popup.opener == null) {
popup.opener = self;
}
popup.location.href = 'guanqing.htm';
}
// -->
</script>
<body>
hihi
</body>
</html>
我在<head>中加入了<base href="http://192.168.1.113/">
我想达到的效果是出来http://192.168.1.113/guangqing.htm
但是,结果弹出来的页面的路径是http://192.168.1.20/guangqing.htm
如果在网页中写<a href="guangqing.htm" target="_blank">就没有问题。
请问如何才能是<base> tag在javascript中起作用?