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.

43 lines
855 B

7 years ago
7 years ago
7 years ago
  1. $(function(){
  2. //头部菜单
  3. $('.classreturn .nav_menu a:last').click(function(e){
  4. $('.tpnavf').toggle();
  5. e.stopPropagation();
  6. });
  7. //左侧导航
  8. $('.classlist ul li').click(function(){
  9. $(this).addClass('red').siblings().removeClass('red');
  10. });
  11. });
  12. //删除确认框
  13. function delconfirm(url,des)
  14. {
  15. if(!des){des='确定要删除吗?';}
  16. //询问框
  17. layer.open({
  18. content: des
  19. ,btn: ['确定', '取消']
  20. ,yes: function(index){
  21. location.href= url;
  22. layer.close(index);
  23. }
  24. });
  25. }
  26. //手机号验证
  27. function validatemobile(mobile)
  28. {
  29. if(mobile.length == 0 || mobile.length != 11)
  30. {
  31. return false;
  32. }
  33. var reg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
  34. if(!reg.test(mobile))
  35. {
  36. return false;
  37. }
  38. return true;
  39. }