window.opener.form1.inputnam.value=
还是不行啊
还是不行啊
解决方案 »
- EASY中如何指定datagrid的toolbar为一个DIV?
- 一个动态加载问题
- 移動圖片問題
- 如何设置div里面的文本大小
- 如何将vml图形导出到excel中.
- ***************有WebIM的开源项目吗*****************************
- <embed>的用法?
- 如何用js检测用户的浏览器是否装了,广告杀手 pop killer
- javaScipt中有这样的两个函数吗? /[^\d]/g.test(strPage) ,isNaN(strPage) //strPage=form.page.value
- 就没有人知道吗,怎么在网页上用Javascript实现本地文件的保存打开
- 如何使一个iframe中的网页内容显示到另一个iframe中?
- meizz(梅花雪)前辈请进,略表敬意。
你可能没有权限操作其它服务器的内容
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="pragma" content="no-cache" />
<style type="text/css">
<!--
-->
</style>
<script language="JavaScript">
<!--
function ShowDialog(){
var ret=window.showModalDialog('http://localhost:123/test.html','','center:yes;help:no;dialogWidth:200px;dialogHeight:100px;')
if(ret){
ret1.value=ret[0];
ret2.value=ret[1];
ret3.value=ret[2];
}
}
-->
</script>
<title></title>
</head>
<body>
返回值1:<input type="text" name="ret1" /><br />
返回值2:<input type="text" name="ret2" /><br />
返回值3:<input type="text" name="ret3" /><br />
<button onclick="JavaScript:ShowDialog();">测试跨域传值</button>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="stylesheet" type="text/css" href="/style/default.css" />
<style type="text/css">
<!--
-->
</style>
<script language="JavaScript" src="/Script/Default.js"></script>
<script language="JavaScript">
<!--
window.returnValue=null;
function ReturnValue(){
var ret=new Array('测试','test','123456');
window.returnValue=ret;
window.close();
}
-->
</script>
<title></title>
</head>
<body><br />
<center><input type="button" onclick="JavaScript:ReturnValue();" value="返回三个值" /></center>
</body>
</html>
我试一下:
var ret=window.showModalDialog('http://localhost:123/test.html','','center:yes;help:no;dialogWidth:200px;dialogHeight:100px;')
ret得不值啊
我试一下:
var ret=window.showModalDialog('http://localhost:123/test.html','','center:yes;help:no;dialogWidth:200px;dialogHeight:100px;')
ret得不到值啊
但window.returnValue他有值