zoukankan      html  css  js  c++  java
  • 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 })
  • 相关阅读:
    分布式事务解决方案之可靠消息最终一致性(四)
    分布式事务解决方案之TCC(三)
    分布式事务解决方案之2PC(二)
    分布式事务初始(一)
    Spring Cloud Alibaba Sentinel 初始
    Spring Cloud Alibaba Nacos 初始
    JAVA 札记
    SpringBoot JPA 札记
    spring boot 札记
    @RequestMapping 和 @GetMapping @PostMapping 区别
  • 原文地址:https://www.cnblogs.com/Larry115/p/4729894.html
Copyright © 2011-2022 走看看