<%@ page contentType="text/html; charset=EUC-KR" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="/WEB-INF/tld/app.tld" prefix="app" %>
<html>
<head>
<s:head theme='simple'/>
<link rel='stylesheet' href='<%= request.getContextPath() %>/css/style.css'>
<script type="" language="JavaScript">
function checkdata()
{
toDate=document.viewTelephoneCheckList.toDate.value;
fromDate=document.documentviewTelephoneCheckList.fromDate.value;
telChecker=document.viewTelephoneCheckList.telChecker.value; if(toDate.length==0 || fromDate.length==0 || telChecker.length==0 )
{
alert("error");
return false;
}
}
</script>
</head>
<body>
<s:form name='viewTelephoneCheckList' action='viewTelephoneCheckList' theme='simple' onsubmit="return checkdata()">
<table cellpadding='3' cellspacing='0' border='1' align="center">
<tr>
<td width='100' align="center">痢八 老磊</td>
<td width='300' ><s:datetimepicker name='toDate' displayFormat='yyyy-MM-dd' /> - <s:datetimepicker name='fromDate' displayFormat='yyyy-MM-dd' /></td>
<td width='100' align="center">痢八磊</td>
<td width='300'><s:textfield name='telChecker' /></td>
</tr>
<tr>
<td width='100' align="center">矫档</td>
<td width='300'></td>
<td width='100' align="center">矫焙备</td>
<td width='300'><s:select name='sigunguCodeId' list='sigunguSelectList' listKey='sigunguCodeId' listValue='name'/></td>
</tr>
</table>
<div align="right"><s:submit value="炼雀"></s:submit> </div>
</s:form>为什么点饥后不去检验这段javascript脚本有没有什么错误啊
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="/WEB-INF/tld/app.tld" prefix="app" %>
<html>
<head>
<s:head theme='simple'/>
<link rel='stylesheet' href='<%= request.getContextPath() %>/css/style.css'>
<script type="" language="JavaScript">
function checkdata()
{
toDate=document.viewTelephoneCheckList.toDate.value;
fromDate=document.documentviewTelephoneCheckList.fromDate.value;
telChecker=document.viewTelephoneCheckList.telChecker.value; if(toDate.length==0 || fromDate.length==0 || telChecker.length==0 )
{
alert("error");
return false;
}
}
</script>
</head>
<body>
<s:form name='viewTelephoneCheckList' action='viewTelephoneCheckList' theme='simple' onsubmit="return checkdata()">
<table cellpadding='3' cellspacing='0' border='1' align="center">
<tr>
<td width='100' align="center">痢八 老磊</td>
<td width='300' ><s:datetimepicker name='toDate' displayFormat='yyyy-MM-dd' /> - <s:datetimepicker name='fromDate' displayFormat='yyyy-MM-dd' /></td>
<td width='100' align="center">痢八磊</td>
<td width='300'><s:textfield name='telChecker' /></td>
</tr>
<tr>
<td width='100' align="center">矫档</td>
<td width='300'></td>
<td width='100' align="center">矫焙备</td>
<td width='300'><s:select name='sigunguCodeId' list='sigunguSelectList' listKey='sigunguCodeId' listValue='name'/></td>
</tr>
</table>
<div align="right"><s:submit value="炼雀"></s:submit> </div>
</s:form>为什么点饥后不去检验这段javascript脚本有没有什么错误啊
这个控件
生成的html代码是什么样的你就明白了!!!
所以一定要看html才行!