$(function() { var voiceplay=function(){ var site = location.href.split('_cms')[0] + '_cms/'; $.ajax({ url: site + 'main_equipment/getMainEquipmentStatus', method:'get', success: function (data) { console.log(data);return; }, complete: function (XHR, TS) { XHR = null; } }) } //定时器,定时加载 setInterval(voiceplay,3000); })
关注微信公众号:lovephp