先在子窗口定义个Function
function GetShowName(inName){
document.getEmlemetById("name1").value=inName;
}
//父窗口的句柄
var winPer=window.dialogArguments;
winPer.GetShowName(B.X);
function GetShowName(inName){
document.getEmlemetById("name1").value=inName;
}
//父窗口的句柄
var winPer=window.dialogArguments;
winPer.GetShowName(B.X);
解决方案 »
- 新手,求推荐jQuery的画图插件,最好有API
- jqgrid动态设置列
- javascript 如何传递页面参数
- 在线等!急问,梅花雪2的树怎样取得点击的节点的date
- 页面刷新后 javascript的全局变量会变吗
- ie与firefox兼容的问题!!在线等。。。。。。。。。
- setTimeOut()里面的函数的参数传递问题
- 什么是block element,什么是inline element?
- 大哥们帮忙看一下这段代码有什么问题?
- 那位大哥可以告诉我怎么做出这样的菜单下拉效果???
- 怎么解决eclipse中js文件不能保存中文字符的问题?
- 怎样用javascript的XMLHTTP把gb2312转为utf-8?
<body>
<input name=uname>
<input type=button onclick=window.open("a.htm") value=选择>
</body>a.html
<script>
function setvalue(v){
window.opener.document.all.uname.value=v//该值可改为由数据库获得
//window.opener.document.getElementById("test").innerHTML="由数据库获得"
opener=null;
self.close();
}</script>
<body>
<select name=user>
<option value=人员1>人员1</option>
<option value=人员2>人员2</option>
<option value=人员3>人员3</option>
</select>
<input onclick=setvalue(user.value) type=button>
</body>
window.opener.document.getElementById("uname").innerHTML=v//该值可改为由数据库获得