打开子窗体后,点击关闭按钮,关闭子窗体。
<form>
<input type="text" name="uname" value=""/>
<input type="submit" name="close1" value="关闭" style="width:100px; height:35px;" οnclick="close()"/>
</form>
<script>
function close(){
var form =document.form[0];
var input_box =form.getElementsByName('uname');
window.returnValue =input_box.value;
window.close();
window.event.returnValue= false;
}
</script>