利用图片请求

    <script type="text/javascript">

        var requestTimes = 0;
        function sendrequest(orderId) {
            var image = document.createElement("IMG");
            image.src = "http://cps.lovo.cn/order/pushOrder.do?orderId=" + orderId;
            image.width = 0;
            image.height = 0;
            image.onerror = retryrequest(orderId);
            image.onload = clean();
            document.body.appendChild(image);
            return true;
        }

        function retryrequest(orderId) {
            if (this.requestTimes < 3) {
                this.requestTimes++;
                sendUnionClick(orderId);
            } else {
                this.requestTimes = 0;
            }
        }

        function clean() {
            this.requestTimes = 0;
        }
    </script>

原文地址:https://www.cnblogs.com/doosmile/p/2304797.html