<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>location</title>
</head>
<script type="text/javascript">
document.write( location.href+"<br/>");
var ahref=location.href;
function test(){
window.open("ahref" ,"_blank","width=400px,height=400px")
}
</script>
</head>
<body>
<input type="button" value="点击弹出" onclick="test()">
</body>
</html>
为什么新打开的窗口不是location.href?
李晓健
相关分类