如何让Html获得Flex中的值

来源:百度知道 编辑:UC知道 时间:2024/05/19 13:54:27
在Html页面中点击一个链接,打开Flex页面,在将Flex处理的数据直接在之前的Html页面中显示出来,可以怎么做?

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('王五