zoukankan      html  css  js  c++  java
  • ajax格式

    复制代码

    $(function(){
        $('#send').click(function(){
             $.ajax({
                 type: "GET",
                 url: "test.json",
                 data: {username:$("#username").val(), content:$("#content").val()},
                 dataType: "json",
                 success: function(data){
                             $('#resText').empty();   //清空resText里面的所有内容
                             var html = ''; 
                             $.each(data, function(commentIndex, comment){
                                   html += '<div class="comment"><h6>' + comment['username']
                                             + ':</h6><p class="para"' + comment['content']
                                             + '</p></div>';
                             });
                             $('#resText').html(html);
                          }
             });
        });
    });
  • 相关阅读:

    链表
    Codeforces 1290A/1291C
    Codeforces 1291B
    Codeforces 1291A
    Codeforces 1295C
    Codeforces 1295B
    ZJNU 2356
    ZJNU 2354
    ZJNU 2353
  • 原文地址:https://www.cnblogs.com/hlan/p/7168655.html
Copyright © 2011-2022 走看看