⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tempfile.tmp

📁 Struts+Hibernate实现MVC
💻 TMP
字号:
<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/include/include.jsp"%>

<html>
  <head>
    <title>GlobalWeather Append or Modify</title>
   <script src="js/common.js"></script>
    <script type="text/javascript">
    function globalWeatherCheck(form)
    {
    	var id=Trim(form.id.value);
    	var sort=Trim(form.sort.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 trShortName=Trim(form.trShortName.value);
    	var trFullName=Trim(form.trFullName.value);
    	
    	if(id=="")
    	{
    		alert('属性编号不能为空,请您重新输入.');
    		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(nShortName.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(!onlyEn2(enFullName))
		       	{
		       		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(!onlyEn2(enShortName))
		       	{
		       		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(sort=="")
    	{
    		alert('属性排序不能为空,请您重新输入.');
    		form.sort.focus();
    		return false;
    	}
    	if(!isInt(sort,"+"))
    	{
    		form.sort.focus();
    		return false;
    	}
    	
    	return true;
    }
    </script>
  </head>
  <link href="css/pub.css" rel="stylesheet" type="text/css"/>
  
  <body text="#000000" bgcolor="#f6f6f3" leftmargin="5px" topmargin="0" marginheight="0" marginwidth="0">
  <logic:notEqual value="isEdit" name="message" scope="request">
  	<bean:define id="url" value="globalWeather.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="globalWeather.do?med=doUpdate"></bean:define>
  	<bean:define id="readOnly" value="true"/>
  </logic:equal>
    <html:form action="${url}" onsubmit="return globalWeatherCheck(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%" cellpadding="1" cellspacing="1" border="0">
      <logic:equal name="message" value="failed">
        <tr>
       	  <td colspan="2" align="center">       	         	  	
		      <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">属性编号</td>
          <td><html:text property="id" 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>
         	<tr height="30">
          <td align="center">中文全称</td>
          <td><html:text property="cnFullName"/></td>
        </tr>
       	<tr height="30">
          <td align="center">中文简称</td>
          <td><html:text property="cnShortName"/></td>
        </tr>
        <tr height="30">
          <td align="center">英文全称</td>
          <td><html:text property="enFullName"/></td>
        </tr>    
        
        <tr height="30">
          <td align="center">英文简称</td>
          <td><html:text property="enShortName"/></td>
        </tr>    
        
        <tr height="30">
          <td align="center">繁体全称</td>
          <td><html:text property="trFullName"/></td>
        </tr>    
        <tr height="30">
          <td align="center">繁体简称</td>
          <td><html:text property="trShortName"/></td>
        </tr>    
       
        <tr height="30">
          <td align="center">属性排序</td>
          <td><html:text property="sort"/></td>
        </tr>
       
       	<tr height="30">
          <td align="right" colspan="2">
          	<input type="submit" value="保存"/>&nbsp;&nbsp;
            <input type="button" value="取消" onClick="javascript:history.back()">&nbsp;&nbsp;&nbsp;
          </td>
        </tr>
      </table>
      
        </td>
      </tr>
    </table>
    
    </div>
    </html:form>
  </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -