Mick.987

相信开源,才是未来的春天!

 

子页面给父页面传值

对于打开的窗口,有时子页面要给父页面传值,我用的B/S仿的c/s架构的,所以用到好多,JS,和css 上的东西,下面是JS的只要两个页面就可以了

父页面

View Code
<form id="form">
<input name="infoimage" type="text" id="infoimage" size="30"><input type="button" name="Submit2" value="上传图片" onClick="document.all.infoimage.value = window.showModalDialog('test2.htm','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</form>

s

子页面

View Code
<form id="form"> <input name="infoimage" type="text" id="infoimage" size="30"> <input type="button" name="Submit2" value="关闭" onClick="window.returnValue=document.all.infoimage.value;window.close();"> </form>

 

 

宝贝网址:

posted on 2011-11-12 09:33  张朋飞  阅读(373)  评论(0编辑  收藏  举报

导航