可以用window.returnValue=[Value]把test2的值返回
解决方案 »
- passit 分享按钮的问题
- 求算法--关于优化分组
- 对象不支持此属性或方法
- javascript一个函数里面的内容看不懂,大家给解读一下.
- 有一个alert在ie下有反应在firefox下没有反应,请大家看一下
- canvas 如何实现a用户画,b,c,d用户可以看到.类似于你画我猜
- 用javascript 让一个输入框的背景为灰色,为什么不能用 输入框.style.background-color = "#cccccc"
- 在XSLT中如何用javascript?有大小于号怎么办?
- 有何办法可以让<Table><td>标签中的数据(数据中有空格)不自动折行。
- easyui 怎么监听 layout 的收缩和展开事件?
- 帮帮忙
- 如何用javascript在IE中进行页面设置?在线等待
returnValue=[code1,code2];
close();
}------------------------
ctrlobj.value = retval[0]
ctrlobj2.value = retval[1]
tmpcode:=code1 + '分格符' + code2;
window.returnValue=tmpcode;
再在test1.htm页面中取出code1和code2
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script lauguage=javascript>
function test2V(){
var col;
var row
var adr = showModalDialog("test2.htm", "", "dialogWidth:18.5em; dialogHeight:11.5em; status:0");
if(adr!=null){
var ss;
ss=adr.split(",");
col=ss[0];
row=ss[1];
a.value=col
b.value=row;
}}
</script>
<input id="a"><input id="b"><input type=button name="button" onclick="test2V()">
</html>test2.htm
<html>
<script>
function ret(){
window.returnValue=code1.value+","+code2.value
}
</script>
<input name="code1">
<input name="code2">
<input type=button onclick="ret();window.close()">
</html>