add.htm 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <link rel="stylesheet" href="/admin/assets/css/bootstrap.min.css" />
  2. <link rel="stylesheet" href="/admin/assets/css/font-awesome.min.css" />
  3. <link rel="stylesheet" href="/admin/assets/css/ace.min.css" />
  4. <link rel="stylesheet" href="/admin/assets/css/ace-rtl.min.css" />
  5. <link rel="stylesheet" href="/admin/assets/css/ace-skins.min.css" />
  6. <script src="/admin/script/jquery.min.js"></script>
  7. <script src="/admin/script/jquery.form.js"></script>
  8. <div class="page-content" style="height:450px;overflow:scroll;">
  9. <div class="page-header">
  10. <h1>添加分类</h1>
  11. </div>
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <form class="form-horizontal" action="/admin/materialType/save" method="post" id="submit_form">
  15. <div class="form-group">
  16. <label class="col-sm-3 control-label"><span style="color: #f00">*</span>名称</label>
  17. <div class="col-sm-9">
  18. <input type="text" name="title" class="col-xs-10 col-sm-5" style="border: 1px solid #ccc" />
  19. </div>
  20. </div>
  21. </form>
  22. </div>
  23. </div>
  24. </div>
  25. <div style="width:100%;text-align: center;">
  26. <button type="button" class="btn btn-info" onclick="return submitForm()" style="padding:0px 5px;margin-top:5px;">
  27. <i class="icon-ok bigger-110"></i>确定
  28. </button>
  29. &nbsp;&nbsp;
  30. <button type="reset" class="btn" onclick="parent.hideAlert()" style="padding:0px 5px;margin-top:5px;">
  31. <i class="icon-undo bigger-110"></i>取消
  32. </button>
  33. </div>
  34. <script>
  35. function submitForm(){
  36. $('#submit_form').ajaxSubmit({
  37. success: function(data){
  38. alert(data.msg);
  39. if(data.success){
  40. parent.location.reload();
  41. }
  42. }
  43. });
  44. }
  45. </script>