NewPinDao.jsp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <%@ include file="/include/head.jsp"%>
  2. <%@ page contentType="text/html;charset=GBK"%>
  3. <%
  4. String roles = (String)request.getAttribute("roles");
  5. String selectFlag="选择";
  6. %>
  7. <html>
  8. <head>
  9. <title>频道编辑</title>
  10. <SCRIPT LANGUAGE="JavaScript">
  11. function submitForm(){
  12. //var re=window.confirm("您要将提交当前的页面吗?");
  13. //if (re==false) { return("");}
  14. if (theForm.MenuID.value=="") {window.alert("菜单ID不能为空");return("");}
  15. if (theForm.MenuName.value=="") {window.alert("菜单名不能为空");return("");}
  16. if (theForm.MenuURL.value=="") {window.alert("菜单URL不能为空");return("");}
  17. if (theForm.Image.value=="") {window.alert("图象不能为空");return("");}
  18. if (theForm.Pos.value=="") {window.alert("位置不能为空");return("");}
  19. s1=theForm.Role.options(theForm.Role.options.selectedIndex).text;
  20. if (s1=="<%=selectFlag%>") {window.alert("角色不能为空");return("");}
  21. theForm.submit();
  22. }
  23. </SCRIPT>
  24. </head>
  25. <body>
  26. <form name="theForm" method="POST" action="SubmitPinDao.do?new=0">
  27. <%@ include file="/include/top.jsp"%>
  28. <table border="0" cellspacing="1" width="100%">
  29. <tr>
  30. <td class="caption" >频道ID</td>
  31. <td class="detail" ><input type="text" name="MenuID" size="80" ></td>
  32. </tr>
  33. <tr>
  34. <td class="caption" >频道名</td>
  35. <td class="detail" ><input type="text" name="MenuName" value="" size="80" ></td>
  36. </tr>
  37. <tr>
  38. <td class="caption" >URL</td>
  39. <td class="detail" ><input type="text" name="MenuURL" size="80" value="/menu.do"></td>
  40. </tr>
  41. <tr>
  42. <td class="caption" >&nbsp;</td>
  43. <td class="detail" >"/menu.do"表示qq菜单,"/pindao.do?mode=0"表示一个频道, "/pindao.do?mode=1"表示树型菜单</td>
  44. </tr>
  45. <tr>
  46. <td class="caption" >图象</td>
  47. <td class="detail" ><input type="text" name="Image" size="80" ></td>
  48. </tr>
  49. <tr>
  50. <td class="caption" >位置</td>
  51. <td class="detail" ><input type="text" name="Pos" size="20" ></td>
  52. </tr>
  53. <tr>
  54. <td class="caption" >角色</td>
  55. <td class="detail" ><select name="Role" >
  56. <%=roles%>
  57. </select></td>
  58. </tr>
  59. </table>
  60. <p><input class="small" type="button" value="下一步骤" name="B1" onclick="submitForm()">
  61. <input class="small" type="button" value="返回" name="B2" onclick="history.back()"></p>
  62. </form>
  63. </body>
  64. </html>