父子页面之间传值 js showModalDialog returnValue

  父页面:

<input type="button" onclick="getData()"  value="上传照片"/>
function getData(){
	t = window.showModalDialog('uploadpic.jsp','DialogWidth:450px;DialogHeight:350px;help:no;status:no');
	if (t != null){
		form1.picture.value= t;
	}
}



子页面:

 
<script>
		window.returnValue = '<%=myFileName%>';
</script>

你可能感兴趣的:(html,jsp)