父页面:
子页面:
<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>