document.getElementById("qrcode").innerHTML = "";

setTimeout(stop, 300000); function stop() { clearInterval(paid_timeout); }

var paid_timeout = setInterval(go, 3000); function go() { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && xhr.status === 200) { var data = xhr.responseText; if (data.search(/<span\sclass=.paid.>/) != -1) { clearInterval(paid_timeout); alert("支付完成"); window.location.href = "/cart.php?a=complete"; } } }; xhr.open("GET", window.location.href, true); xhr.send(); }

帮我改一段代码 不用jquery:			$#qrcodeqrcodewidth180height180text$qr_url;			setTimeoutstop 300000;			function stop							clearIntervalpaid_timeout;									var paid_timeout = setIntervalgo 3000;			function go

原文地址: https://www.cveoy.top/t/topic/jaha 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录