<form action="loginBaseLogin.do" target="tgIII" name="loginForm" method="post">
<div id="login_btn"><a href="#" onclick="submitForm();">Login</a></div>
</form> post
function submitForm(){
//打开一个名称为tgIII的空窗体
window.open('about:blank','tgIII', 'left=0,top=0,width='+
(screen.availWidth - 10) +',height='+ (screen.availHeight-50) +',scrollbars,resizable=yes,toolbar=no,location=no,status=no'); spa
//当前请求提交到 打开的窗口中
loginForm.submit(); orm
//若是已是弹出的窗口就再也不处理
if(!(window.name=="tgIII")){
window.opener=null;//父对象为空,其实这就话可要不可要
window.open("","_self");//从新打开一个空的 窗体,这时关闭空的窗体时,不提示确认信息
window.close();//这个时候,能够关闭窗口
}
} 对象