随笔-51  评论-14  文章-0  trackbacks-0
子窗口中内容:
 function change(obj){
    var strsel 
= obj.options[obj.selectedIndex].text;
    window.opener.document.getElementById(
"yj").value = strsel;
 }
 
<select id="yj" onchange="change(this)">

父窗口内容:
<textarea id="yj" cols="20" rows="5"></textarea>

如果子窗口是用iframe嵌入在父窗口中:
    function change(obj){
        var strsel 
= obj.options[obj.selectedIndex].text;
           parent.thisform.yijian.innerHTML 
= strsel;
           parent.thisform.yijian2.value 
= strsel;
}
posted on 2008-06-13 09:07 Hank1026 阅读(333) 评论(0)  编辑  收藏 所属分类: 每日积累

只有注册用户登录后才能发表评论。


网站导航: