📄 global_place_add.jsp.svn-base
字号:
<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/include/include.jsp"%>
<html>
<head>
<title>GlobalPlace Append or Modify</title>
<script src="js/common.js"></script>
<script src="js/qlist.js"></script>
<script src="js/pinyin.js"></script>
<script type="text/javascript">
function strDateTime(str)
{
var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);
if(r==null)return false;
var d= new Date(r[1], r[3]-1, r[4]);
return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]);
}
function globalPlaceCheck(form)
{
var id=Trim(form.id.value);
var cnFullName=Trim(form.cnFullName.value);
var cnShortName=Trim(form.cnShortName.value);
var enFullName=Trim(form.enFullName.value);
var enShortName=Trim(form.enShortName.value);
var trFullName=Trim(form.trFullName.value);
var trShortName=Trim(form.trShortName.value);
var galleryful=Trim(form.galleryful.value);
var serviceDate=Trim(form.serviceDate.value);
var remark=Trim(form.remark.value);
if(id=="")
{
alert('场地ID不能为空,请您重新输入.');
form.id.focus();
return false;
}
if(!isInt(id,"+"))
{
form.id.focus();
return false;
}
if(cnFullName!="")
{
if(checkSpecialString(cnFullName)){
alert("非法字符,请重新输入!");
form.cnFullName.focus();
return false;
}
if(cnFullName.length > 100){
alert("汉字输入不能超出100个,请重新输入!");
form.cnFullName.focus();
return false;
}
}
else
{
alert("中文全称不能为空,请您输入!");
form.cnFullName.focus();
return false;
}
if(cnShortName!="")
{
if(checkSpecialString(cnShortName)){
alert("非法字符,请重新输入!");
form.cnShortName.focus();
return false;
}
if(cnShortName.length > 100){
alert("汉字输入不能超出100个,请重新输入!");
form.cnShortName.focus();
return false;
}
}
else
{
alert("中文简称不能为空,请您输入!");
form.cnShortName.focus();
return false;
}
if(enFullName!="")
{
if(checkSpecialString(enFullName)){
alert("非法字符,请重新输入!");
form.enFullName.focus();
return false;
}
if(enFullName.length > 200){
alert("英文输入不能超出200个,请重新输入!");
form.enFullName.focus();
return false;
}
}else{
alert("英文全称不能为空,请您输入!");
form.enFullName.focus();
return false;
}
if(enShortName!="")
{
if(checkSpecialString(enShortName)){
alert("非法字符,请重新输入!");
form.enShortName.focus();
return false;
}
if(enShortName.length > 200){
alert("英文输入不能超出200个,请重新输入!");
form.enShortName.focus();
return false;
}
}else{
alert("英文简称不能为空,请您输入!");
form.enShortName.focus();
return false;
}
if(trFullName!="")
{
if(checkSpecialString(trFullName)){
alert("非法字符,请重新输入!");
form.trFullName.focus();
return false;
}
if(trFullName.length > 100){
alert("汉字输入不能超出100个,请重新输入!");
form.trFullName.focus();
return false;
}
}
if(trShortName!="")
{
if(checkSpecialString(trShortName)){
alert("非法字符,请重新输入!");
form.trShortName.focus();
return false;
}
if(trShortName.length > 100){
alert("汉字输入不能超出100个,请重新输入!");
form.trShortName.focus();
return false;
}
}
if(remark!="")
{
if(checkSpecialString(remark)){
alert("非法字符,请重新输入!");
form.remark.focus();
return false;
}
if(remark.length > 2000){
alert("输入不能超出2000个,请重新输入!");
form.remark.focus();
return false;
}
}
if(galleryful=="")
{
alert('最大容纳人数不能为空,请您重新输入.');
form.galleryful.focus();
return false;
}
if(!isInt(galleryful,"+"))
{
form.galleryful.focus();
return false;
}
if(serviceDate!="")
{
if(!strDateTime(serviceDate))
{
alert('投入使用时间为错误格式,请您重新输入.');
form.serviceDate.focus();
return false;
}
}
}
</script>
</head>
<link href="css/pub.css" rel="stylesheet" type="text/css"/>
<body text="#000000" leftmargin="5px" topmargin="0" marginheight="0" marginwidth="0">
<logic:notEqual value="isEdit" name="message" scope="request">
<bean:define id="url" value="globalPlace.do?med=doCreate"></bean:define>
<bean:define id="readOnly" value="false"/>
</logic:notEqual>
<logic:equal value="isEdit" name="message" scope="request">
<bean:define id="url" value="globalPlace.do?med=doUpdate"></bean:define>
<bean:define id="readOnly" value="true"/>
</logic:equal>
<html:form action="${ url }" onsubmit="return globalPlaceCheck(this)" focus="id">
<table cellspacing="0" cellpadding="5" width="100%" align="center" border="0">
<tr height="30">
<td class="fm1">添加/修改场地信息</td>
</tr>
</table>
<div align="left">
<table width="100%" >
<tr>
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="1">
<logic:equal name="message" value="failed" scope="request">
<tr>
<td colspan="2" align="center" class="tdtext1">
<html:messages id="failed" message="true">
<font color="black"><b><bean:write name="failed"/></b> </font></html:messages> </td>
</tr>
</logic:equal>
<tr height="30">
<td align="center" class="tdlabel2">场地ID</td>
<td class="tdtext2"><html:text property="id" styleClass="txtname" readonly="${ readOnly }"/>
<logic:messagesPresent property="info" message="true">
<html:messages id="info" message="true">
<b><bean:write name="info"/></b>
</html:messages>
</logic:messagesPresent>
</td>
</tr>
<%@ include file="/common/name.jsp" %>
<tr height="30">
<td align="center" class="tdlabel1">最大容纳人数</td>
<td class="tdtext1"><html:text property="galleryful" styleClass="txtname"/></td>
</tr>
<tr height="30">
<td align="center" class="tdlabel2">所在的城市</td>
<td class="tdtext2"><input type="text" name="city" onkeyup="queryList('queryCity', this, cityId);" value="<gooooal:value type='city' name='globalPlaceForm' property='cityId' />"><html:hidden property="cityId" /></td>
</tr>
<tr height="30">
<td align="center" class="tdlabel1">投入使用时间</td>
<td class="tdtext1"><html:text property="serviceDate" styleClass="txtname"/> 格式如:2007-1-1或2007-01-01</td>
</tr>
<tr height="30">
<td align="center" class="tdlabel2">备注</td>
<td class="tdtext2"><html:textarea property="remark" styleClass="txtmemo" /></td>
</tr>
<tr height="30">
<td align="center" colspan="2" class="tdlabel1" valign="middle">
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
<tr>
<td width="20%" > </td>
<td width="12%" align="left"> <input name="submit" type="submit" value=" 保 存 "/> </td>
<td width="12%" align="left"> <input name="button" type="button" onClick="javascript:history.back()" value=" 取 消 "></td>
<td width="12%" align="left"></td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</html:form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -