js页面的弹框怎么关闭啊

JavaScript07

js页面的弹框怎么关闭啊,第1张

1、单纯的关闭

window.opener.location.reload()//刷新父窗口中的网页

window.close()//关闭当前窗窗口

2、提交后关闭

function save(){

document.getElementById("pointsform").submit()

alert('保存成功')

window.opener.document.getElementById("cmd").value="query"

window.opener.document.getElementById("form的id").submit()//提交

window.close()//关闭当前窗口

}

window.open(popURL1,"",popWindowOptions)

换成window.open(popURL1,"_blank",popWindowOptions)

执行两次就打开两个页面。