[align=left][size=large] document.forms[0].action="<%=path%>/pages/missiveManage/addMissiveNo.jsp";
document.forms[0].target = "_self";
document.forms[0].submit();
------------------------------------------------------
function checkform() {
var isTrue = true;
if (document.forms[0].name.value == "") {
alert( "请输入名称!" );
document.forms[0].name.focus();
isTrue = false;
}else if(document.forms[0].theFile.value == null || document.forms[0].theFile.value == "") {
alert('请选择模板');
isTrue = false;
}
<%
if(!id.equals("-1")){
%>
else if (document.forms[0].seqNo.value == "") {
alert( "请输入序号!" );
document.forms[0].seqNo.focus();
isTrue = false;
}else if((document.forms[0].seqNo.value != "")&&(!isDigit(document.forms[0].seqNo.value))){
alert( "序号必须为数字!" );
document.forms[0].seqNo.focus();
isTrue = false;
}
<%
}
%>
else {
var fileName = document.forms[0].theFile.value;
if(fileName.indexOf(".doc")<=0 && fileName.indexOf(".dot")<=0){
alert("模板文件必须是doc或dot文件");
isTrue = false;
}
}
if(isTrue){
document.forms[0].submit();
}
}
-------------------------------------------------------------
function checkform1(str,id){
var isTrue = true;
if (document.forms[0].name.value == "") {
alert( "请输入名称!" );
document.forms[0].name.focus();
isTrue = false;
}else if(document.forms[0].theFile.value == null || document.forms[0].theFile.value == "") {
alert('请选择模板');
isTrue = false;
}else {
var fileName = document.forms[0].theFile.value;
if(fileName.indexOf(".doc")<=0 && fileName.indexOf(".dot")<=0){
alert("模板文件必须是doc或dot文件");
isTrue = false;
}
}
document.form.action = "<%=path %>/pages/missiveManage/missivetype/mtgl.do?doaction=changeMt&id="+id;
if(isTrue){
document.forms[0].submit();
}
}
[/size][/align]
document.forms[0].target = "_self";
document.forms[0].submit();
------------------------------------------------------
function checkform() {
var isTrue = true;
if (document.forms[0].name.value == "") {
alert( "请输入名称!" );
document.forms[0].name.focus();
isTrue = false;
}else if(document.forms[0].theFile.value == null || document.forms[0].theFile.value == "") {
alert('请选择模板');
isTrue = false;
}
<%
if(!id.equals("-1")){
%>
else if (document.forms[0].seqNo.value == "") {
alert( "请输入序号!" );
document.forms[0].seqNo.focus();
isTrue = false;
}else if((document.forms[0].seqNo.value != "")&&(!isDigit(document.forms[0].seqNo.value))){
alert( "序号必须为数字!" );
document.forms[0].seqNo.focus();
isTrue = false;
}
<%
}
%>
else {
var fileName = document.forms[0].theFile.value;
if(fileName.indexOf(".doc")<=0 && fileName.indexOf(".dot")<=0){
alert("模板文件必须是doc或dot文件");
isTrue = false;
}
}
if(isTrue){
document.forms[0].submit();
}
}
-------------------------------------------------------------
function checkform1(str,id){
var isTrue = true;
if (document.forms[0].name.value == "") {
alert( "请输入名称!" );
document.forms[0].name.focus();
isTrue = false;
}else if(document.forms[0].theFile.value == null || document.forms[0].theFile.value == "") {
alert('请选择模板');
isTrue = false;
}else {
var fileName = document.forms[0].theFile.value;
if(fileName.indexOf(".doc")<=0 && fileName.indexOf(".dot")<=0){
alert("模板文件必须是doc或dot文件");
isTrue = false;
}
}
document.form.action = "<%=path %>/pages/missiveManage/missivetype/mtgl.do?doaction=changeMt&id="+id;
if(isTrue){
document.forms[0].submit();
}
}
[/size][/align]