zoukankan      html  css  js  c++  java
  • 2021年5月13日

    时间:2个小时左右

    代码:159行左右

    博客:1

    知识点:异步编程、promise

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title>Document</title>
    </head>
    <body>
      <div>前后端交互</div>
      <script type="text/javascript" src="js/jquery.js"></script>
      <script type="text/javascript">
        /*
          前后端交互-异步编程与Promise概述
        */
        // var ret = '---';
        // $.ajax({
        //   url: 'http://localhost:3000/data',
        //   success: function(data) {
        //     ret = data;
        //     console.log(ret)
        //   }
        // });
        // console.log(ret)
    
        // ----------------------------
        // $.ajax({
        //   url: 'http://localhost:3000/data',
        //   success: function(data) {
        //     console.log(data)
        //   }
        // });
        // $.ajax({
        //   url: 'http://localhost:3000/data1',
        //   success: function(data) {
        //     console.log(data)
        //   }
        // });
        // $.ajax({
        //   url: 'http://localhost:3000/data2',
        //   success: function(data) {
        //     console.log(data)
        //   }
        // });
        // -----------------------------------
        $.ajax({
          url: 'http://localhost:3000/data',
          success: function(data) {
            console.log(data)
            $.ajax({
              url: 'http://localhost:3000/data1',
              success: function(data) {
                console.log(data)
                $.ajax({
                  url: 'http://localhost:3000/data2',
                  success: function(data) {
                    console.log(data)
                  }
                });
              }
            });
          }
        });
        
        
        
      </script>
    </body>
    </html>
  • 相关阅读:
    NHibernate 配置增加代码感知
    NHibernate应用开发
    Spring.Net+NHibernate+Castle学习网站
    Windows Live Writer 网易博客配置
    第一章. 序言
    NHibernate之配置文件属性说明
    Log4Net各参数API
    EntityFramework 6.0< Code First > 连接 Mysql数据库
    maven阿里云中央仓库
    eclipse安装maven
  • 原文地址:https://www.cnblogs.com/j-y-s/p/14903330.html
Copyright © 2011-2022 走看看