You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.8 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. @extends('admin.layouts.app')
  2. @section('title', '关键词添加')
  3. @section('content')
  4. <h5 class="sub-header"><a href="/fladmin/keyword">关键词列表</a> > 添加关键词</h5>
  5. <form id="addarc" method="post" action="/fladmin/keyword/doadd" role="form" enctype="multipart/form-data" class="table-responsive">{{ csrf_field() }}
  6. <table class="table table-striped table-bordered">
  7. <tbody>
  8. <tr>
  9. <td>关键词:</td>
  10. <td><input name="keyword" type="text" id="keyword" value="" class="required" style="width:30%" placeholder="在此输入关键词"></td>
  11. </tr>
  12. <tr>
  13. <td>链接网址:</td>
  14. <td><input name="rpurl" type="text" id="rpurl" value="http://" style="width:60%" class="required"> (请用绝对地址)</td>
  15. </tr>
  16. <tr>
  17. <td colspan="2"><button type="submit" class="btn btn-success" value="Submit">保存(Submit)</button>&nbsp;&nbsp;<button type="reset" class="btn btn-default" value="Reset">重置(Reset)</button><input type="hidden"></input></td>
  18. </tr>
  19. </tbody></table></form><!-- 表单结束 -->
  20. <script>
  21. $(function(){
  22. $(".required").blur(function(){
  23. var $parent = $(this).parent();
  24. $parent.find(".formtips").remove();
  25. if(this.value=="")
  26. {
  27. $parent.append(' <small class="formtips onError"><font color="red">不能为空!</font></small>');
  28. }
  29. else
  30. {
  31. $parent.append(' <small class="formtips onSuccess"><font color="green">OK</font></small>');
  32. }
  33. });
  34. //重置
  35. $('#addarc input[type="reset"]').click(function(){
  36. $(".formtips").remove();
  37. });
  38. $("#addarc").submit(function(){
  39. $(".required").trigger('blur');
  40. var numError = $('#addarc .onError').length;
  41. if(numError){return false;}
  42. });
  43. });
  44. </script>
  45. @endsection