|
发表于 2011-11-5 13:06:49
|
显示全部楼层
Re: 怎样去掉javascript中由于window.close()窗口关闭所弹出的对
//这个jsp页面本身就是弹出的模式窗体
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display" %>
<%@ page import="org.apache.struts.util.RequestUtils"%>
<%@ page contentType="text/html" import="org.modern.environment.share.dto.,java.util.,javax.servlet.http.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%
DecodeItemDto[] regionDto = (DecodeItemDto[])request.getAttribute("regionDto");
DecodeItemDto[] dealDto = (DecodeItemDto[])request.getAttribute("dealDto");
%>
<HTML>
<HEAD>
<TITLE><bean:message key="wk.mpjd.mpdj" bundle="wk"/></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../../css/style.css" type="text/css">
<script language="javascript" src="/js/check.js" type="text/javascript"></script>
</HEAD>
<script language="javascript">
<!--
function check(){
//document.frmAdd.submit();
var year=document.frmAdd.year.value;
var flag=1;
if (!CheckDigit(year) || (year==null) || !CheckNull(year) || (year.length<4)){
flag=-1;
frmAdd.year.value="";
}
if(flag==-1){
alert("\\u6570\\u636E\\u8F93\\u5165\\u9519\\u8BEF\\uFF01\\u8BF7\\u91CD\\u65B0\\u8F93\\u5165\\uFF01",2);
}
else{
frmAdd.submit();
//提交后转到action处理
}
}
-->
</script>
<BODY>
<html:form name="frmAdd" type="org.modern.environment.pw.entinfo.struts.EntActionForm" action="/business/pw/entinfo/entAction.do" method="post">
<input type="hidden" name="judge" value="">
<br> <br>
<table width="650px" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="right">
//出问题的地方
<a href="javascript:window.close()" onclick="javascript:check();//模式窗体关閉self.close()//但转到action后又打开另一个窗体,这个窗体調用javascript:window.close()时弹出对话框,问题就在这,请指教"><bean:message key="wk.mpjd.save" bundle="wk"/></a>
<a href="#" onclick="javascript:frmAdd.reset()"><bean:message key="wk.mpjd.clear" bundle="wk"/></a>
<a href="#" onclick="javascript:self.close()"><bean:message key="wk.mpjd.close" bundle="wk"/></a>
</td>
</tr>
</table>
<br>
<table width="650px" align="center" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="100px" nowrap>
<font color="red"><bean:message key="wk.mpjd.year" bundle="wk"/></font>
<html:text property="year" maxlength="4" style="width:35px"/>
</td>
<td width="400px" nowrap>
<font color="red"><bean:message key="pw.entinfo.personCode" bundle="pw"/></font>
<html:text property="personCode" maxlength="12" style="width:248px"/>
</td>
</tr>
<tr>
<td width="500px" nowrap colspan="2" align="left"> <font color="blue"><bean:message key="pw.entinfo.entName" bundle="pw"/></font>
<html:text property="entName" maxlength="30" style="width:350px"/>
</td>
</tr>
</table>
</html:form>
</BODY>
</HTML> |
|