我正在尝试将图像从弹出子窗体传递到父窗体。
父表单脚本
<script type="text/javascript">
var popup;
function SelectSig() {
popup = window.open("Popup.htm", "Popup", "width=600,height=300");
popup.focus();
}
</script>
父表单按钮
<input type="button" value="Insert Signature" onclick="SelectSig()" /></td>
子表单脚本
<script type="text/javascript">
function SetSig() {
if (window.opener != null && !window.opener.closed) {
var ClientSig = window.opener.document.getElementById("ClientSig");
ClientSig.src = document.getElementById("saveSignature").src;
window.close();
}
</script>
子表单按钮
<input type="button" value="Select" onclick="SetSig();" />