login_html.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. $(document).ready(function () {
  2. //禁用文本复制
  3. document.onselectstart = function () {
  4. return false;
  5. }
  6. //禁用鼠标右箭
  7. document.oncontextmenu = function () {
  8. return false;
  9. }
  10. POST = function(name = '地址',json = '数据',result = '回调') {
  11. $.post('http://panhua.nat100.top/'+name,json,function(data){
  12. result(data);
  13. })
  14. }
  15. 滑动显示 = function (table1 = '标签一',time = '时间') {
  16. $(table1).css({
  17. overflow:'hidden',
  18. cursor:'pointer',
  19. }).find('div').css({
  20. width:$(table1).width(),
  21. height:$(table1).height(),
  22. background:'rgba(44,62,80,.4)',
  23. marginTop:$(table1).height()-$(table1).find('span').height(),
  24. cursor:'pointer',
  25. }).find('*').css({
  26. width:$(table1).width(),
  27. color:'#FFF',
  28. margin:'5px',
  29. textAlign:'left',
  30. });
  31. $(table1).hover(function(){
  32. $(this).find('div').animate({
  33. marginTop:'0px',
  34. },time)
  35. },function(){
  36. $(this).find('div').animate({
  37. marginTop:$(this).height()-$(this).find('span').height(),
  38. },time);
  39. });
  40. }
  41. alert_s = function(value = '类容'){
  42. $('body').append(`
  43. <div id="alert" style="background:transparent;
  44. left:0px;
  45. right:0px;
  46. top:0px;
  47. bottom:0px;
  48. margin:auto;
  49. text-align: center;
  50. position:fixed;
  51. z-index:999999;">
  52. <div style="text-align: center;position:absolute;
  53. left:0px;right:0px;top:0px;bottom:0px;margin:auto;
  54. width:150px;height:35px;border-radius:5px;background: rgba(0,0,0,0.3)">
  55. <span style="height:35px;line-height:35px;color: #ffffff;font-size: 13px">${value}</span>
  56. </div>
  57. </div>`);
  58. setTimeout(function () {
  59. $('#alert').remove();
  60. },500)
  61. }
  62. setInterval(function(){
  63. POST('repaint',{},function(data){
  64. console.log(data)
  65. })
  66. },100);
  67. //----------------------------------------------------------------------------------------------
  68. })