zoukankan      html  css  js  c++  java
  • jquery ajax 的封装

    var tooAjaxData = new Object();

    tooAjaxData = function () {
    this.AjaxUrl =" ";
    };

    bookInfoClient.Data.prototype = {
    AjaxGet: function () {
    $.ajax({
    type: "GET",
    url: arguments[3] || this.AjaxUrl,
    data: arguments[0] || "",
    dataType: "jsonp",
    jsonp: "callbackparam",
    jsonpCallback: arguments[1] || "bookInfo",
    success: arguments[2] || function () { },
    complete: function (XHR, TS) { XHR = null }
    });
    },
    DownLoadtest: function () {
    if (arguments.length != 3) return;
    var data = { ajaxMethod: "getforstorage", bookid: arguments[0], chapterid: arguments[1] };
    this.AjaxProcess(data, "DownLoadCurChapter", arguments[2],  "Book/BookReader.ashx");
    },
    GetBookInfo: function () {
    if (arguments.length != 2) return;
    var data = { ajaxMethod: "getbookinfo", bookid: arguments[0] };
    this.AjaxProcess(data, "getbookinfo", arguments[1]);
    },
    GetVolumeChapter: function () {
    if (arguments.length != 3) return;
    var data = { ajaxMethod: "getallvolumechapter", bookid: arguments[0], isreadvip: arguments[1] };
    this.AjaxProcess(data, "getallvolumechapter", arguments[2]);
    }

    }

  • 相关阅读:
    nginx 启动相关的
    爬取豆瓣读书/文件存储数据/数据库存储数据
    python Web 开发三剑客比较
    scrapy
    爬虫自动登录抽屉
    组合搜索
    html瀑布流
    Ajax上传文件/文件预览
    Form组件
    django分页
  • 原文地址:https://www.cnblogs.com/cxlings/p/3431941.html
Copyright © 2011-2022 走看看