摘要: 菜单表Menu栏目表Catalog(其中有一个menuId)文章表Article(其中有一个catId)Article中的catId是参照Catalog中的catIdCatalog中的menuId是参照Menu中的menuId查询同属一一个菜单的所有文章Menu menu = menuDAO.findById(menuId);//查找所需的菜单IdSet cataloglist= menu.getCatalogs();//查询属于菜单Id的所有栏目String queryString = "from Article as model where model.catalog in(:c 阅读全文
posted @ 2012-05-30 17:59 食神 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 第一步 Struts.xml中<action name="go" class="com.action.MyAction"> <result name="success">/next.jsp</result></action>第二步 在webRoot中創建一個go.action的空文件,什么內容也不用寫第三步就是在web.xml中的welcome-file節點中加上剛才新建的go.action的空文件名就OK了<welcome-file-list> <welcome-fi 阅读全文
posted @ 2012-04-13 00:27 食神 阅读(747) 评论(0) 推荐(0) 编辑
摘要: Ckeditor3.6版本有问题不适用JSP,Ckeditor3.0版本能够很正常使用。<script type="text/javascript" src="adminback/ckeditor/ckeditor.js"></script><textarea rows="15" cols="100" id="content" name="content"><s:property value="content"/& 阅读全文
posted @ 2012-03-30 19:32 食神 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 菜单表Menu栏目表Catalog(其中有一个menuId)文章表Article(其中有一个catId)Article中的catId是参照Catalog中的catIdCatalog中的menuId是参照Menu中的menuId查询同属一一个菜单的所有文章Menu menu = menuDAO.findById(menuId);//查找所需的菜单IdSet cataloglist= menu.getCatalogs();//查询属于菜单Id的所有栏目String queryString = "from Article as model where model.catalog in(:c 阅读全文
posted @ 2012-03-30 19:31 食神 阅读(393) 评论(0) 推荐(0) 编辑
摘要: substr($row['keyid'],0,3);截取前3个字符串substr("she is a well-read girl",0);从第0个字符开始截取substr("she is a well-read girl",4,14);从第4个字符开始连续截取14个字符substr("she is a well-read girl",-4,4);从倒数第4个字符开始截取4个字符substr("she is a well-read girl",0,-4);从第1个字符开始截取,截取到倒数第4个字符 阅读全文
posted @ 2011-12-19 20:41 食神 阅读(154) 评论(0) 推荐(0) 编辑
摘要: <script Language="JavaScript">function ChkFields() {if (document.myform.UserName.value=='') {window.alert ("请输入用户名!");myform.UserName.focus();return false}if (document.myform.UserName.value.Length<=2) {window.alert ("请用户名长度必须大于2!");myform.UserName.focus 阅读全文
posted @ 2011-12-19 20:35 食神 阅读(455) 评论(0) 推荐(0) 编辑