在1.htm中代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<script type="text/javascript">
function int()
{
var url="2.htm?a=123";
window.open(url,"_blank");
}
</script>
</head>
<body οnlοad="int()">
</body>
</html>
在2.htm中代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<script type="text/javascript">
function int1()
{
var url=document.URL;
var a1=url.split('?')[1];
alert(a1);
}
</script>
</head>
<body οnlοad="int1()">
</body>
</html>