add.html 1.1 KB

123456789101112131415161718192021222324252627
  1. <form id="form" action="{:url('askCategory/add')}">
  2. <input type="hidden" name="picture" value="" id="picture" />
  3. <table class="formtable">
  4. <tr><th>分类名称:</th><td><input class="input" datatype="*" type="text" name="title" value="" /></td></tr>
  5. <tr><th>栏目排序:</th><td><input class="input w60" datatype="n" type="text" name="sort" value="0" /> <span class="gray fn-f12">数字越大越靠前</span></td></tr>
  6. <tr><th>图片样式</th><td><div class="img-review fn-cp"></div></td></tr>
  7. <tr>
  8. <th></th>
  9. <td>
  10. <input type="submit" value="确定" class="button button-blue submit" />
  11. <input type="reset" value="重置" class="button button-blank"/>
  12. </td>
  13. </tr>
  14. </table>
  15. </div>
  16. </form>
  17. <script type="text/javascript">
  18. Do('base','layer','form',function(){
  19. $('#form').isForm();
  20. $(".img-review").click(function(){openwin('{:url("system/passport.common/upload")}')});
  21. })
  22. //添加图片
  23. function setImg(show_src){
  24. $("#picture").val(show_src);
  25. $(".img-review").html('<img src="'+show_src+'">');
  26. }
  27. </script>