zoukankan      html  css  js  c++  java
  • 利用图片请求

        <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>

  • 相关阅读:
    photoshop
    Linux服务之 Nginx安装
    linux笔记之基础 1
    GPT分区
    ftp
    python socket
    mariaDB
    redids
    长连接和短连接
    linux文件打包并发送到其他服务器
  • 原文地址:https://www.cnblogs.com/doosmile/p/2304797.html
Copyright © 2011-2022 走看看