function go() { var xhr = new XMLHttpRequest(); xhr.open("GET", window.location.href); 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.send(); }

帮我改一段代码 不用jquery:			function go							$getwindowlocationhreffunctiondata											if datasearchspansclass=paid != -1													clearIntervalpaid_timeout;							alert支付完成;							windowlocationhref =

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

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