add.jsp 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <!doctype html>
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <%@ include file="../../common/head.jsp"%>
  8. <link rel="stylesheet" type="text/css" href="../res/js//plugins/webuploader/webuploader.css">
  9. <link rel="stylesheet" type="text/css" href="../res/css/demo/webuploader-demo.css">
  10. <script type="text/javascript" src="../res/js/plugins/webuploader/webuploader.js"></script>
  11. <script type="text/javascript" src="../res/js/plugins/webuploader/uploader.js"></script>
  12. <cs:initFile/>
  13. <script type="text/javascript">
  14. $(function () {
  15. $("#airportDiv").hide();
  16. $("#airwaysDiv").hide();
  17. });
  18. function dotype(type){
  19. if(type == 0){
  20. $("#airportDiv").hide();
  21. $("#airwaysDiv").hide();
  22. }else if(type == 1){
  23. $("#airportDiv").show();
  24. $("#airwaysDiv").hide();
  25. }else if(type ==2){
  26. $("#airportDiv").show();
  27. $("#airwaysDiv").show();
  28. }
  29. }
  30. function doItem(id) {
  31. $('#airwaysId').empty();
  32. $('#airwaysId').html('<option value="">--无--</option>');
  33. $.getJSON('../machine/getAirways.cs', {
  34. 'airportId': $('#airportId').val()
  35. }, function (data) {
  36. $.each(data, function (i, obj) {
  37. $("#airwaysId").append('<option value="' + obj.id+'">' + obj.name + '</option>');
  38. });
  39. });
  40. }
  41. </script>
  42. </head>
  43. <body>
  44. <div class="wrapper wrapper-content">
  45. <div class="row">
  46. <div class="col-sm-12">
  47. <cs:form_validate formId="addUserForm"/>
  48. <form class="form-horizontal" action="add.cs" id="addUserForm" method="POST">
  49. <div class="form-group">
  50. <label class="col-sm-3 control-label">项目名称:</label>
  51. <div class="col-sm-6">
  52. <input id="name" name="name" class="form-control" validate="{required:true}" validateMessage="{required:'请输入名称'}" >
  53. </div>
  54. </div>
  55. <div class="form-group">
  56. <label class="col-sm-3 control-label">描述:</label>
  57. <div class="col-sm-6">
  58. <textarea id="info" name="info" class="form-control" style="height: 310px;"></textarea>
  59. </div>
  60. </div>
  61. <div class="form-group">
  62. <div class="col-sm-4 col-sm-offset-3 pull-left">
  63. <button class="btn btn-default btn-dlg-close">取消</button>
  64. <button class="btn btn-primary" type="submit">提交</button>
  65. </div>
  66. </div>
  67. </form>
  68. </div>
  69. </div>
  70. </div>
  71. </body>
  72. </html>