基于JSP+SERVLET的新闻发布系统(三)

拖了这么久。。今天把栏目管理还有新闻管理模块的也挂出来。。

栏目管理跟用户管理一样。

这里重点讲解新闻管理。

效果图如上:

1,可选择栏目类别,且栏目类别是动态生成的。

默认生成的文章是未审核状态的。

   						栏目类别:
				<select name="typeId" id="typeId" style=" 100">
					<option value="">
						请选择
					</option>
					<%
							NewsType type = new NewsType();
							NewsTypeService typeService = new NewsTypeService();
							List<NewsType> typeList = typeService.findAll(type);
								if(typeList!=null&&typeList.size()>0){
									for(int i=0;i<typeList.size();i++){
										type = typeList.get(i);%>
					<option value="<%=type.getTypeId() %>">
						<%=type.getTypeName() %>
					</option>
					<%}
					}%>
				</select>


,2,文本编辑器使用的是百度开发的ueditor,很好用,方便简单,具体使用方法可上官网查找。

	<script  id="editor" type="text/plain" name="content">初始化</script>	
	<script  id="editor" type="text/plain" name="content">${news.content }</script>

3,全选操作。

	function ChkAllClick(sonName, cbAllId) {
		var arrSon = document.getElementsByName(sonName);
		var cbAll = document.getElementById(cbAllId);
		var tempState = cbAll.checked;
		for (i = 0; i < arrSon.length; i++) {
			if (arrSon[i].checked != tempState)
				arrSon[i].click();
		}
	}


猛搓下载源码-》》》http://download.csdn.net/detail/a331251021/5783043

原文地址:https://www.cnblogs.com/dyllove98/p/3201231.html