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

📄 post.jsp

📁 一个不错的bbs论坛系统.对初学者很有帮助
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="comm/header.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>论坛发帖</title>
<script language="JavaScript">
  function selectType(beforetitle) {
    document.forms[0].ptitle.value=beforetitle+document.forms[0].ptitle.value;
    document.forms[0].ptitle.focus();
    return;
  }
  function checklength(){
  	alert("你即将发表的帖子长度为 : "+document.forms[0].content.value.length+" 字节");
  }
  
  ie = (document.all)? true:false
  if (ie){
	function ctlent(eventobject){
	 if(event.ctrlKey && window.event.keyCode==13){ document.forms[0].submit();}
	 }
  }
  
  function checkpost(){
   if (document.getElementById("ptitle").value.length <1) {
		alert("帖子标题不能够为空.");
		document.getElementById("ptitle").focus();
		return false;
	}
   if (document.getElementById("ptitle").value.length >50) {
		alert("帖子标题不能够超过50个字节.");
		document.getElementById("ptitle").focus();
		return false;
	}
   if (document.forms[0].content.value.length <1) {
		alert("帖子内容不能够为空.");
		document.forms[0].content.focus();
		return false;
	}
   if (document.forms[0].content.value.length >60000) {
		alert("帖子内容不能给超过60000个字节.");
		document.forms[0].content.focus();
		return false;
	}
   document.getElementById("subbt").disabled=true;
   document.getElementById("resetbt").disabled=true;
   document.forms[0].submit();
  }
   function readflag() {
    var read=document.getElementById("read");
    var mnum=document.getElementById("moneynum");
    if(read.options[read.selectedIndex].value==4) {
      mnum.style.display="";
    }else {
      mnum.style.display="none";
    }
  }
  function showmore() {
     if (document.getElementById("more").checked == true) {
         document.getElementById("magupload").style.display = "";
         document.getElementById("flag").innerText="关闭附件管理"
     }else{
         document.getElementById("magupload").style.display = "none";
         document.getElementById("flag").innerText="打开附件管理";
     }
  }
  function showmood() {
     if (document.getElementById("scheck").checked == true) {
         document.getElementById("smood").style.display = "";
         document.getElementById("stext").innerText="关闭选择"
     }else{
         document.getElementById("smood").style.display = "none";
         document.getElementById("stext").innerText="选择心情";
     }
  }
  
  function magAtts(url, width, height) {
		window.open(url, "attachment", "statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width="+width + ",height="+height);
  }
	
  function AddText(NewCode) { document.forms[0].content.value += NewCode;}
	
  function insertAtt(fileName,fileRealName,fileExt) {
	    if(fileExt=="gif" || fileExt=="jpg" || fileExt=="jpeg" || fileExt=="bmp" || fileExt=="png") {
	      AddText("\n相关附件如下:\n");
	      AddText("[img]DownFile.htm?fileName="+fileName+"[/img]");
	    }else if(fileExt=="swf") {
	      AddText("\n相关附件如下:\n");
	      AddText("[swf=450,350]DownFile.htm?fileName="+fileName+"[/swf]");
	    }else {
	      AddText("\n相关附件如下:  ");
	      AddText("[url=DownFile.htm?fileName="+fileName+"]"+ fileRealName+ "[/url]");
	    }
  }
</script>
</head>
<body>
<div class="tabwidth"><yhbbs:mainHead /></div>
<div class="tabwidth">
  <table class=tab1 align=center cellSpacing=0 cellPadding=0 width=100%>
   	 <tr><td class=tab_c height=20px colspan=2><b><font color=#FFFFFF>&nbsp;&nbsp;发表帖子</font></b></td></tr>
     <tr><td class=td_t width=100%>
		     <table width=100% cellSpacing=0 cellPadding=0>
		     <html:form action="PostAction.htm" method="post">
		     	<input type=hidden name=classId value="<bean:write name="classId" />" />
		     	<input type=hidden name=forumId value="<bean:write name="forumId" />" />
		     	<input type=hidden name=action value="<bean:write name="action" />" />
		     	<logic:present name="ree">
		     		<input type=hidden name=artId value="<bean:write name="artId" />" />
		     		<input type=hidden id=ptitle name=ptitle value="<bean:write name="title" />" />
		     	</logic:present>
		     	<logic:present name="pve">
		     		<tr height=30px><td class=td_bg width=20%>&nbsp;<b>标题和类型</b>&nbsp;
				     <select name=betitle onchange=selectType(this.options[this.selectedIndex].value)>
				     <option selected value=''>选择类型</option>
				     <option value=[原创]>[原创]</option>
				     <option value=[转贴]>[转贴]</option>
				     <option value=[灌水]>[灌水]</option>
				     <option value=[讨论]>[讨论]</option>
				     <option value=[求助]>[求助]</option>
				     <option value=[推荐]>[推荐]</option>
				     <option value=[公告]>[公告]</option>
				     <option value=[注意]>[注意]</option>
				     <option value=[贴图]>[贴图]</option>
				     <option value=[建议]>[建议]</option>
				     <option value=[下载]>[下载]</option>
				     <option value=[分享]>[分享]</option>
				     </select>
				     </td><td class=td_l width=80%>&nbsp;&nbsp;
				     <logic:equal name="action" value="edit">
		     			<input type=text id=ptitle name=ptitle size=60 maxlength=80 value="<bean:write name="title" />">
		     		 </logic:equal>
				     <logic:notEqual name="action" value="edit">
		     			<input type=text id=ptitle name=ptitle size=60 maxlength=80 />
		     		 </logic:notEqual>
				     &nbsp;&nbsp;标题不能够超过50个汉字</td></tr>
		     	</logic:present>
		     	 
			     <tr height=20px><td class=td_tbg width=20%>&nbsp;<b>选择心情</b>&nbsp;</td>
			     <td class=td_lt valign=top width=80%>&nbsp;
			     <input type="checkbox" id="scheck" onclick="showmood();" ><span id="stext">选择心情</span>
			     <div id="smood" style="display:none">&nbsp;
			     <input type=radio name=emot value='' checked />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			     <input type=radio name=emot value='mood1.gif'/><img src=webapp/images/emot/mood1.gif width=19 border=0 alt=大笑 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood2.gif'/><img src=webapp/images/emot/mood2.gif width=19 border=0 alt=眨眼 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood3.gif'/><img src=webapp/images/emot/mood3.gif width=19 border=0 alt=龇牙 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood4.gif'/><img src=webapp/images/emot/mood4.gif width=19 border=0 alt=厉害 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood5.gif'/><img src=webapp/images/emot/mood5.gif width=19 border=0 alt=金钱 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood6.gif'/><img src=webapp/images/emot/mood6.gif width=19 border=0 alt=抱抱 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood7.gif'/><img src=webapp/images/emot/mood7.gif width=19 border=0 alt=好美哦 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood8.gif'/><img src=webapp/images/emot/mood8.gif width=19 border=0 alt=嘘! />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood9.gif'/><img src=webapp/images/emot/mood9.gif width=19 border=0 alt=再见 />&nbsp;&nbsp;
			     <br>&nbsp;
			     <input type=radio name=emot value='mood10.gif'/><img src=webapp/images/emot/mood10.gif width=19 border=0 alt=想想 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood11.gif'/><img src=webapp/images/emot/mood11.gif width=19 border=0 alt=困惑 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood12.gif'/><img src=webapp/images/emot/mood12.gif width=19 border=0 alt=疑问 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood13.gif'/><img src=webapp/images/emot/mood13.gif width=19 border=0 alt=生气 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood14.gif'/><img src=webapp/images/emot/mood14.gif width=19 border=0 alt=大怒 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood15.gif'/><img src=webapp/images/emot/mood15.gif width=19 border=0 alt=讨厌 />&nbsp;&nbsp;
			     <input type=radio name=emot value='mood16.gif'/><img src=webapp/images/emot/mood16.gif width=19 border=0 alt=愤怒 />&nbsp;&nbsp;

⌨️ 快捷键说明

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