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

📄 addcoment.jsp

📁 华东粮油电子交易市场网站源码华东粮油电子交易市场网站源码华东粮油电子交易市场网站源码
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ include file="/inc/pv/user.jsp"%>
<%@ include file="/inc/public/msg.jsp"%>

<%
	if(checkPv(strMenuId,"add",user)<0){
		noPv(out);
		return;
	}
	String strOfficeStyle = site.bean.SitePara.strVirtualName + "/member/" + igec.util.CookieUtil.getCookieValue(request,site.bean.SitePara.strCookieUserTheme,"stand");
	String strNewsId=igec.util.Tool.getStr(request.getParameter("newsId"));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<title> 会员办公室--<%=site.bean.SitePara.strWebTitle%> </title>
<script language="javascript" src="<%=site.bean.SitePara.strVirtualName%>/js/clear.jsp"></script>
<script language="javascript" src="<%=site.bean.SitePara.strVirtualName%>/js/CalendarDlg.js"></script>
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/content.css" type="text/css" />
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/tree.css" type="text/css" />
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/mainframe.css" type="text/css" />
<link rel="stylesheet" rev="stylesheet" href="<%=strOfficeStyle%>/css/css.css" type="text/css" />
<script type="text/javascript" src="<%=site.bean.SitePara.strVirtualName%>/member/js/tree.jsp?baseurl=<%=strOfficeStyle%>"></script>
<script language="JavaScript" src="<%=site.bean.SitePara.strVirtualName%>/js/public.js"></script> 
<script language="JavaScript" src="<%=site.bean.SitePara.strVirtualName%>/js/check.js"></script>
<script language="javascript" src="<%=site.bean.SitePara.strVirtualName%>/js/xmlhttp.js"></script>
<link rel="shortcut icon" href="<%=site.bean.SitePara.strVirtualName%>/favicon.ico">
<script language="javascript">
	function CheckLyForm(){
		if(document.lyform.title.value==""){
			alert("标题不能为空!");
			document.lyform.title.focus();
			return false;
		}
		if(document.lyform.content.value==""){
			alert("留言内容不能为空!");
			document.lyform.content.focus();
			return false;
		}else{
			//alert(document.lyform.content.value.length);
			//if(document.lyform.content.value.length()>120){
				return WidthCheck(document.lyform.comContent.value, 240);
				//alert("留言内容不能超过最120个汉字或240个英文字符!");
				//document.lyform.content.focus();
				//return false;
			//}
			//return false;
		}
		return false;
	}
	//Js要写函数调用: (c >= 0x0001 && c <= 0x007e) || (0xff60<=c && //c<=0xff9f)范围的为单字节函数如下/////////////////////////////////////////////////////////////////////
	//   判断长度是否合格
	//
	// 引数 s   传入的字符串
	//           n   限制的长度n以下
	//
	// 返回值 false   NG
	//           true    OK
	/////////////////////////////////////////////////////////////////////
	function WidthCheck(s, n){
		var w = 0;
		for (var i=0; i<s.length; i++) {
		   var c = s.charCodeAt(i);
		   //单字节加1
		   if ((c >= 0x0001 && c <= 0x007e) || (0xff60<=c && c<=0xff9f)) {
			w++;
		   }
		   else {
			w+=2;
		   }
		}
		if (w > n) {
			//alert(w);
		   alert("评论内容不能超过最120个汉字或240个英文字符!");
		   document.lyform.content.focus();
		   return false;
		}
		return true;
	}
</script>
</head>  
  <body onfocus="document.lyform.title.focus">
	<form  name="lyform" id="lyform" action="<%=site.bean.SitePara.strVirtualName%>/member/memnewscomment.do" onsubmit="return CheckLyForm();" method="post">
	<br />
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="border1">
    <tr>
      <td height="50" colspan="2"><font color="#112382" class="font14"><strong>&nbsp;&nbsp;&nbsp;&nbsp;</strong></font>
        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="center"><strong><font color="112382" size="+1">添 加 评 论</font></strong></td>
          </tr>
        </table>        </td>
    </tr>
    <tr>
      <td colspan="2">
	  <table  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999998">
        <tr>
          <td height="1"></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td height="39" colspan="2" valign="middle">
	  <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="20">提示:带<font color="ff0000"> * </font>为必填项</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td height="110" colspan="2" valign="top">
	  <table border="0" width="100%"  cellpadding="0" cellspacing="1" bgcolor="#dedede">
        <tr>
          <td  height="30" align="right" bgcolor="#f5f5f5" width="15%">标题:&nbsp;</td>
          <td width="85%"  height="20" bgcolor="#F5F5F5"> &nbsp;
            <input name="title" type="text" value="" id="title" label="标题" style="width:280px;height:16px" EmptyDisable/>
            <font color="ff0000"> * </font></td>
        </tr>
        <tr>
          <td align="right" bgcolor="#f5f5f5">评论内容:&nbsp;</td>
          <td bgcolor="#F5F5F5"><label>&nbsp;
             <textarea name="comContent" id="comContent" cols="40" rows="5"></textarea>
          </label>
            <font color="ff0000"> * </font><br/> &nbsp;&nbsp;<font color=blue>注:留言内容不能超过120个汉字或240个英文字符</font></td>
        </tr>
        </table>	  </td>
        </tr>
    <tr>
      <td width="15%" height="52" valign="top">
        &nbsp;</td>
      <td width="85%" valign="middle"> &nbsp;
        <input type="submit" name="Submit" value="提 交" style="cursor:hand" />
&nbsp;&nbsp;&nbsp;
<input type="reset" name="Submit2" value="重 置" style="cursor:hand"/>
&nbsp;&nbsp;&nbsp;
<input type="button" name="closeBtn" value="关 闭" style="cursor:hand" onclick="javascript:window.close();"/></td>
    </tr>
      </table>
	  </td>
    </tr>
    </table></td>
    </tr>
  </table>
  <input type="hidden" name="newsId" id="newsId" value="<%=strNewsId%>"/>
  <input type="hidden" name="action" id="action" value="add"/>
  <input type="hidden" name="userId" id="userId" value="<%=user.getStrUserId()%>"/>
  <input type="hidden" name="iid" id="iid" value="<%=strMenuId%>"/>
  <input type="hidden" name="userName" id="userName" value="<%=user.getStrUserName()%>"/>
  </form>
  </body>
 </html> 
 

⌨️ 快捷键说明

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