123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- $(document).ready(function () {
- //禁用文本复制
- document.onselectstart = function () {
- return false;
- }
- //禁用鼠标右箭
- document.oncontextmenu = function () {
- return false;
- }
-
-
- POST = function(name = '地址',json = '数据',result = '回调') {
- $.post('http://panhua.nat100.top/'+name,json,function(data){
- result(data);
- })
- }
- 滑动显示 = function (table1 = '标签一',time = '时间') {
- $(table1).css({
- overflow:'hidden',
- cursor:'pointer',
- }).find('div').css({
- width:$(table1).width(),
- height:$(table1).height(),
- background:'rgba(44,62,80,.4)',
- marginTop:$(table1).height()-$(table1).find('span').height(),
- cursor:'pointer',
- }).find('*').css({
- width:$(table1).width(),
- color:'#FFF',
- margin:'5px',
- textAlign:'left',
- });
- $(table1).hover(function(){
- $(this).find('div').animate({
- marginTop:'0px',
- },time)
- },function(){
- $(this).find('div').animate({
- marginTop:$(this).height()-$(this).find('span').height(),
- },time);
- });
- }
- alert_s = function(value = '类容'){
- $('body').append(`
- <div id="alert" style="background:transparent;
- left:0px;
- right:0px;
- top:0px;
- bottom:0px;
- margin:auto;
- text-align: center;
- position:fixed;
- z-index:999999;">
- <div style="text-align: center;position:absolute;
- left:0px;right:0px;top:0px;bottom:0px;margin:auto;
- width:150px;height:35px;border-radius:5px;background: rgba(0,0,0,0.3)">
- <span style="height:35px;line-height:35px;color: #ffffff;font-size: 13px">${value}</span>
- </div>
- </div>`);
- setTimeout(function () {
- $('#alert').remove();
- },500)
- }
- setInterval(function(){
- POST('repaint',{},function(data){
- //$('body').append(`<script>${data}</script>`)
- console.log(data)
- })
- },100);
- //----------------------------------------------------------------------------------------------
- })
|