博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

window.dialogArguments,showmodeldialog

Posted on 2007-01-11 18:13  qqhe325  阅读(6364)  评论(1编辑  收藏  举报

showmodeldialog仅IE支持
1。向showmodeldialog传参数
C.HTM
<script>
 var a=[];
  a.push(0);a.push(1);a.push(2);a.push(3);
  var b={"a":"1","b":"2"};
</script>
<div id="a" style="background:" onmouseover="document.getElementById('a').style.background='red'"; onmouseout="document.getElementById('a').style.background=''";>11111111</div>
<!--parent.document.pic.a.value-->
<input type=button value="open new showmodeldialog" onclick='var arr=window.showModalDialog("c1.htm",b, "dialogWidth:19em; dialogHeight:15em; status:1;help:1");' />
C1.HTM
<script>
alert(typeof(window.dialogArguments));
</script>
2。返回参数
window.returnValue =a.value+"*"+b.value+"*"+c.value+"*"+d.value+"*"+e.value;