1,访问页面:a.html:
<html>
<head>
</head>
<body>
<input type="text" name="name" id="name" >
<input type="button" value="选择用户"
onclick="window.open('b.html','selectname',800,600,1);">
</body>
</html>
2,新打开的选择页面b.html
<html>
<head>
<script type="text/javascript">
function selectOrg(name){
if(window.opener){
window.opener.document.all.name.value =name;
window.close();
}
}
</script>
</head>
<body>
<input type="radio" name="name" onclick="selectOrg('李四')">李四
<input type="radio" name="name" onclick="selectOrg('张三')">张三
<input type="radio" name="name" onclick="selectOrg('王五')">王五
</body>
</html>
试一下吧! 点击a.html中的"选择用户"按钮就会弹出b.html,在b.html选择用户后就能返回到a.html并显示返回值
温馨提示:答案为网友推荐,仅供参考