• jquery功能实现总结


    最近一直在做.net这方面的,也学习了jquery一些东西,其中实现了自动关闭页面,json解析字符串,拼接字符串,for循环,函数调用,等一些功能,自己也学习了,也希望可以帮助大家,大家看后给提提意见,有什么错误。

    $(window).on('load', function () {

        setInterval(function () {
            window.close();
        },20000)


        Page = 1;

        $.ajax({
    10         type: "get",
    11         url: "/Up_heat.ashx",
    12         dataType: "json",
    13         success: window.Sel_Name = function (TourNav) {
    14             for (i = 1; i < TourNav.length; i++) {
    15                 var Name = TourNav[i-1].Name;
    16                 //Select(SelectNext());
    17                 //alert(Name);
    18                 Select(Name);
    19             }
    21             //i = 0;
    22             //while (i < TourNav.length) {
    23                 //var Name = TourNav[i].Name;
    24                 //alert(Name);
    $.ajax({ 
    10         type: "get", 
    11         url: "/Up_heat.ashx", 
    12         dataType: "json", 
    13         success: window.Sel_Name = function (TourNav) { 
    14             for (i = 1; i < TourNav.length; i++) { 
    15                 var Name = TourNav[i-1].Name; 
    16                 //Select(SelectNext()); 
    17                 //alert(Name); 
    18                 Select(Name); 
    19             } 
    21             //i = 0; 
    22             //while (i < TourNav.length) { 
    23                 //var Name = TourNav[i].Name; 
    24                 //alert(Name); 
    25                 //Select(Name); 
    26                 //i++; 
    27             //} 
    28         } 
    29     }) 
    

    25                 //Select(Name);
    26                 //i++;
    27             //}
    28         }
    29     })
    30     
    31     function Select(Name) {
    33         $.ajax({
    34             type: "get",
    35             data: {
    36                 "text": Name,
    37                 "divlen": Page
    38             },
    39             url: "/TravlNotett.ashx",
    40             dataType: "json",
    41             success: function (tour) {
    42                 //for (a = 0; a < tour.data.books.length; a++) {
    43
    44                 //    SelectNext(Name);
    45                 //    //alert(tour.data.books[a].title);
    46                 //}
    47                 //alert(tour.data.books[1].title);
    48                 if (tour.data.books[0].title != " ") {
    49                     SelectNext(Name);
    50                 }
    51                 else {
    52                     alert("hello");
    53                 }
    54             }
    55         })
    56     }
    57
    58     function SelectNext(Name) {
    59         $.ajax({
    60             type: "get",
    61             data: {
    62                 "text": Name,
    63                 "divlen": Page
    64             },
    65             url: "/TravlNotett.ashx",
    66             dataType: "json",
    67             success: function (tour) {
    68                 if (tour.data.books[0].title != " ") {       
    69                     Up_Heat(Name, Page);
    70                     Page += 1;
    71                     SelectNext(Name);
    72                 }
    73                 else {
    74                     //alert("hello");
    75                 }
    76             }
    77         })
    78     }
    79
    80     function Up_Heat(Name, Page) {
    81         $.ajax({
    82             type: "post",
    83             data: {
    84                 "Name": Name,
    85                 "Heat": Page
    86             },
    87             url: "/Up_heat_aa.ashx",
    88             dataType: "json",
    89             success: function (a) {
    90                 //alert(a);
    91             }
    92         })
    93     }
    94 })
  • 相关阅读:
    [BFS][链表][二分][STL]JZOJ 5875 听我说,海蜗牛
    [SPFA]JZOJ 5869 绿洲
    [Splay]Luogu 3960 NOIP2017 列队
    [扩欧]JZOJ 5855 吃蛋糕
    [模拟退火][堆优化Prim]2017TG Day2 T2 宝藏
    [并查集]奶酪
    [容斥]JZOJ 5843 b
    JS Undefined 类型
    Python logging 模块
    14.浏览器屏幕缩放bug修复
  • 原文地址:https://www.cnblogs.com/Larry115/p/4729894.html
Copyright © 2020-2023  润新知