jQuery AJAX 方法success()后台传来的4种数据详解

下面是关于“jQuery AJAX 方法success()后台传来的4种数据详解”的完整攻略。

什么是AJAX?

首先,我们需要了解一下AJAX。AJAX即“Asynchronous JavaScript and XML”,是指通过JavaScript发起异步请求,从而实现在不重新加载整个页面的情况下更新页面的局部内容。

具体来说,AJAX 通过 jQuery.ajax() 方法来向服务器发送异步请求,并通过.success()、.error()和.complete() 方法来处理返回的数据。

AJAX 方法success()的作用

AJAX 方法.success()用于处理AJAX请求成功的返回数据。其基本语法如下:

$.ajax({
    url: "test.php",//请求的URL地址
    type: "GET",//请求方式:GET 或者 POST
    data: "name=John&location=Boston",//需要发送到服务端的数据
    success: function(data){//请求成功后执行的回调函数
        //data为从服务器返回的数据
    }
});

其中,data即为从服务器返回的数据。通过.success()方法,我们可以对返回的数据进行处理。

后台传来的4种数据

成功的AJAX请求会返回各种数据格式,包括以下四种:字符串、XML、HTML和JSON。下面我们分别介绍这四种数据格式。

字符串

如果AJAX请求返回的数据是字符串,可以通过如下方式获取:

$.ajax({
    url: "test.php",
    type: "GET",
    success: function(data){
        console.log(data);//输出字符串
    }
});

在上面的示例中,我们通过控制台输出了从服务器返回的字符串。

XML

如果AJAX请求返回的数据是XML,可以通过如下方式获取:

$.ajax({
    url: "test.xml",
    type: "GET",
    dataType: "xml",
    success: function(xml){
        $(xml).find("title").each(function(){
            //对每个<title>元素进行处理
        });
    }
});

在上面的示例中,我们通过.dataType属性指定返回的数据类型为XML,并通过$(xml).find()方法找到XML中的每个元素,然后对其进行处理。</p> <h3>HTML</h3> <p>如果AJAX请求返回的数据是HTML,可以通过如下方式获取:</p> <pre><code>$.ajax({ url: "test.html", type: "GET", dataType: "html", success: function(html){ $("div").append(html);//将HTML代码插入到<div>元素中 } }); </code></pre> <p>在上面的示例中,我们通过.dataType属性指定返回的数据类型为HTML,并将返回的HTML代码插入到了</p> <div>元素中。</p> <h3>JSON</h3> <p>如果AJAX请求返回的数据是JSON,可以通过如下方式获取:</p> <pre><code>$.ajax({ url: "test.json", type: "GET", dataType: "json", success: function(json){ console.log(json);//输出JSON数据 } }); </code></pre> <p>在上面的示例中,我们通过.dataType属性指定返回的数据类型为JSON,并通过控制台输出从服务器返回的JSON数据。</p> <h2>示例说明</h2> <p>下面我们来看两个示例,分别使用AJAX获取XML数据和JSON数据。</p> <h3>AJAX获取XML数据</h3> <p>HTML代码:</p> <pre><code><div> <ul id="list"></ul> </div> </code></pre> <p>jQuery代码:</p> <pre><code>$.ajax({ url: "books.xml", type: "GET", dataType: "xml", success: function(xml){ $(xml).find("book").each(function(){ $("#list").append("<li>" + $(this).find("title").text() + "</li>"); }); } }); </code></pre> <p>在上面的示例中,我们通过AJAX获取了一个XML文档,然后通过.find()方法遍历每个<book>元素,并把其中的<title>元素的文本插入到了一个</p> <ul>元素中。</p> <h3>AJAX获取JSON数据</h3> <p>HTML代码:</p> <pre><code><div> <ul id="list"></ul> </div> </code></pre> <p>jQuery代码:</p> <pre><code>$.ajax({ url: "books.json", type: "GET", dataType: "json", success: function(json){ $.each(json.books, function(i, book){ $("#list").append("<li>" + book.title + "</li>"); }); } }); </code></pre> <p>在上面的示例中,我们通过AJAX获取了一个JSON数据,然后通过$.each()方法遍历每个book对象,并把其中的title属性的值插入到了一个</p> <ul>元素中。</p> <p>以上就是关于“jQuery AJAX 方法success()后台传来的4种数据详解”的完整攻略。希望对你有所帮助!</p> <div class="entry-readmore"><div class="entry-readmore-btn"></div></div> <div class="entry-copyright"><p>本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:<a href="https://pythonjishu.com/shtezisikkmvqnu/">jQuery AJAX 方法success()后台传来的4种数据详解 - Python技术站</a></p></div> </div> <div class="entry-tag"><a href="https://pythonjishu.com/tag/java/" rel="tag">Java</a></div> <div class="entry-action"> <div class="btn-zan" data-id="239830"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div> </div> <div class="entry-bar"> <div class="entry-bar-inner"> <div class="entry-bar-info entry-bar-info2"> <div class="info-item meta"> <a class="meta-item j-heart" href="javascript:;" data-id="239830"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i> <span class="data">0</span></a> <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a> <a class="meta-item dashang" href="javascript:;"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-cny-circle-fill"></use></svg></i> 打赏 <span class="dashang-img dashang-img2"> <span> <img src="//pythonjishu.com/wp-content/uploads/2023/02/2023-02-06_10-34-29.jpg" alt="微信扫一扫"/> 微信扫一扫 </span> <span> <img src="//pythonjishu.com/wp-content/uploads/2023/02/2023-02-06_10-35-01.jpg" alt="支付宝扫一扫"/> 支付宝扫一扫 </span> </span> </a> </div> <div class="info-item share"> <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="239830" data-qrcode="https://pythonjishu.com/shtezisikkmvqnu/"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报</a> <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i> </a> <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i> </a> <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i> </a> <a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow" href="#"> <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg></i> </a> </div> <div class="info-item act"> <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a> </div> </div> </div> </div> </div> <div class="entry-page"> <div class="entry-page-prev entry-page-nobg"> <a href="https://pythonjishu.com/pixjimprqdggqoz/" title="JAVA生产者消费者(线程同步)代码学习示例" rel="prev"> <span>JAVA生产者消费者(线程同步)代码学习示例</span> </a> <div class="entry-page-info"> <span class="pull-left"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg></i> 上一篇</span> <span class="pull-right">2023年5月26日</span> </div> </div> <div class="entry-page-next entry-page-nobg"> <a href="https://pythonjishu.com/kckhznrccdanbvf/" title="JavaBean实体类处理外键过程解析" rel="next"> <span>JavaBean实体类处理外键过程解析</span> </a> <div class="entry-page-info"> <span class="pull-right">下一篇 <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg></i></span> <span class="pull-left">2023年5月26日</span> </div> </div> </div> <div class="entry-related-posts"> <h3 class="entry-related-title">相关文章</h3><ul class="entry-related cols-3 post-loop post-loop-default"><li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/fpsipjelnntktzv/" rel="bookmark"> maven 打包项目的几种方式 </a> </h3> <div class="item-excerpt"> <p>当我们使用Maven构建项目时,打包是非常重要的一部分。Maven支持多种打包方式,例如JAR、WAR、EAR等。本文将详细介绍Maven打包项目的几种方式,并提供两个示例。 1. JAR包 在Maven项目中使用maven-jar-plugin插件来生成JAR文件。当我们运行mvn package命令时,Maven将使用此插件来创建一个包含编译后的类文件和…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年5月20日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/fpsipjelnntktzv/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/xjidslqhmcrrjzd/" rel="bookmark"> 10中java常见字符串操作实例 </a> </h3> <div class="item-excerpt"> <p>以下是“10种Java常见字符串操作实例”的完整攻略: 简介 字符串是Java中最常用的数据类型之一,几乎所有的Java程序都会涉及字符串的处理。本文主要介绍Java中常见的字符串操作方法。 10种Java常见字符串操作实例 1. 字符串的比较 比较两个字符串是否相等,可以使用equals()方法。 示例1: String str1 = "Hell…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年5月26日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/xjidslqhmcrrjzd/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/cgfiwdwjaozdfqx/" rel="bookmark"> Java的Hibernate框架中的双向主键关联与双向外键关联 </a> </h3> <div class="item-excerpt"> <p>Java的Hibernate框架提供了双向主键关联和双向外键关联两种关联方式,这两种方式有着各自特点和适合的场景。下面将分别对这两种关联方式进行详细解析,并给出相关示例。 双向主键关联 双向主键关联是指关联关系中两个实体类都具有主键,并且相互之间通过持有对方主键的引用来建立关联。双向主键关联可以通过@MapsId和@ManyToOne注解来实现,在Java中…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年5月19日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/cgfiwdwjaozdfqx/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/bruwbeztkzjilkf/" rel="bookmark"> 一篇文章带你了解MySQL数据库基础 </a> </h3> <div class="item-excerpt"> <p>一篇文章带你了解MySQL数据库基础 概述 MySQL是一个非常流行的关系型数据库管理系统。它被广泛应用于Web应用程序的开发中,因为它能够处理大量的数据,而且速度快且稳定。 这篇文章会介绍MySQL数据库的基础知识,包括如何创建数据库和表格,如何插入和查询数据以及如何使用一些常见的命令和函数。 安装MySQL 在开始使用MySQL数据库之前,我们需要先安装…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年6月16日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/bruwbeztkzjilkf/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/uyfikymsqzudfli/" rel="bookmark"> java中Servlet监听器的工作原理及示例详解 </a> </h3> <div class="item-excerpt"> <p>下面我为你详细讲解“Java中Servlet监听器的工作原理及示例详解”的攻略。 1. Servlet监听器的概述 Servlet监听器,是Servlet API中提供的,用于监听Servlet请求和响应生命周期的组件。Servlet监听器通过绑定到Servlet相关的事件,去观察和响应Servlet容器的实践,对于多种应用场景和实现方式均提供了相应的使用解…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年6月15日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/uyfikymsqzudfli/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-myimg"><div class="wpcom_myimg_wrap __flow"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2252152819722406" crossorigin="anonymous"></script> <!-- 通用 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2252152819722406" data-ad-slot="5528197265" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div></li><li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/ictnnenjqoecgux/" rel="bookmark"> SpringBoot应用启动内置Tomcat的过程源码分析 </a> </h3> <div class="item-excerpt"> <p>下面我将为您详细讲解“SpringBoot应用启动内置Tomcat的过程源码分析”。 SpringBoot应用启动流程 SpringBoot能够提供如此简单易用的开发体验,离不开对应用启动过程的封装和自动配置。下面是SpringBoot应用启动的大体流程: SpringBoot启动类加载:在启动类的main方法中触发SpringApplication.run…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年5月19日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/ictnnenjqoecgux/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/ziehnfrbsubrfpi/" rel="bookmark"> hta作品笨狼CSDN爬虫 </a> </h3> <div class="item-excerpt"> <p>HTA作品笨狼CSDN爬虫 概述 CSDN爬虫是一个基于HTA(HTML应用程序)的简单爬虫工具,使用VBScript语言编写。它可以抓取CSDN上任何用户的博客文章列表,包括文章标题、URL和发布时间等信息。 工具及环境 Windows系统 IE浏览器 记事本或其他文本编辑器 步骤 步骤一:新建HTA应用程序 使用文本编辑器新建一个.hta文件,在文件头部…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年6月15日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/ziehnfrbsubrfpi/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> <li class="item item-no-thumb"> <div class="item-content"> <h3 class="item-title"> <a href="https://pythonjishu.com/vzhqychjnnqusrn/" rel="bookmark"> 如何使用Java缓存框架? </a> </h3> <div class="item-excerpt"> <p>使用Java缓存框架可以有效地提高系统的性能和响应速度。下面将对如何使用Java缓存框架进行详细讲解。 什么是Java缓存框架 Java缓存框架是一个用于在内存中缓存数据的工具。它可以有效地提高系统的性能和响应速度。Java缓存框架最常用的实现方式是基于内存的缓存,使用Java缓存框架可以将数据在内存中保存一段时间,从而减少系统对数据库的访问。 常见的Jav…</p> </div> <div class="item-meta"> <a class="item-meta-li" href="https://pythonjishu.com/other/java/" target="_blank">Java</a> <span class="item-meta-li date">2023年5月11日</span> <div class="item-meta-right"> <a class="item-meta-li comments" href="https://pythonjishu.com/vzhqychjnnqusrn/#comments" target="_blank" title="评论数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i>0</a><span class="item-meta-li stars" title="收藏数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i>0</span><span class="item-meta-li likes" title="点赞数"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up"></use></svg></i>0</span> </div> </div> </div> </li> </ul> </div> </article> </main> <aside class="sidebar"> <div class="widget widget_post_thumb"><h3 class="widget-title"><span>最新文章</span></h3> <ul> <li class="item"> <div class="item-img"> <a class="item-img-inner" href="https://pythonjishu.com/openai-sora/" title="OpenAI重磅发布首个视频生成模型Sora,网友:一出手就是王炸!"> <img width="480" height="300" src="https://pythonjishu.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="OpenAI重磅发布首个视频生成模型Sora,网友:一出手就是王炸!" decoding="async" data-original="https://pythonjishu.com/wp-content/uploads/2024/02/66372-20240216111025772-344088444-480x300.gif" /> </a> </div> <div class="item-content"> <p class="item-title"><a href="https://pythonjishu.com/openai-sora/" title="OpenAI重磅发布首个视频生成模型Sora,网友:一出手就是王炸!">OpenAI重磅发布首个视频生成模型Sora,网友:一出手就是王炸!</a></p> <p class="item-date">2024年2月17日</p> </div> </li> <li class="item"> <div class="item-img"> <a class="item-img-inner" href="https://pythonjishu.com/openai-developer-conference/" title="短短 45 分钟发布会,OpenAI 再次让 AI 圈一夜未眠!"> <img width="480" height="300" src="https://pythonjishu.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="短短 45 分钟发布会,OpenAI 再次让 AI 圈一夜未眠!" decoding="async" data-original="https://pythonjishu.com/wp-content/uploads/2023/11/6ee575e7369b-480x300.jpg" /> </a> </div> <div class="item-content"> <p class="item-title"><a href="https://pythonjishu.com/openai-developer-conference/" title="短短 45 分钟发布会,OpenAI 再次让 AI 圈一夜未眠!">短短 45 分钟发布会,OpenAI 再次让 AI 圈一夜未眠!</a></p> <p class="item-date">2023年11月8日</p> </div> </li> <li class="item"> <div class="item-img"> <a class="item-img-inner" href="https://pythonjishu.com/ai-create-article-3/" title="如何评估AI 文章的输出质量:深入了解人工智慧生成的内容"> <img width="480" height="300" src="https://pythonjishu.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="如何评估AI 文章的输出质量:深入了解人工智慧生成的内容" decoding="async" data-original="https://pythonjishu.com/wp-content/uploads/2023/10/photo-1684369175833-4b445ad6bfb5-480x300.jpg" /> </a> </div> <div class="item-content"> <p class="item-title"><a href="https://pythonjishu.com/ai-create-article-3/" title="如何评估AI 文章的输出质量:深入了解人工智慧生成的内容">如何评估AI 文章的输出质量:深入了解人工智慧生成的内容</a></p> <p class="item-date">2023年11月1日</p> </div> </li> <li class="item"> <div class="item-img"> <a class="item-img-inner" href="https://pythonjishu.com/ai-create-article-2/" title="根据目标受众调整AI 写作风格:有效运用人工智能技术撰写吸引读者的内容"> <img width="480" height="300" src="https://pythonjishu.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="根据目标受众调整AI 写作风格:有效运用人工智能技术撰写吸引读者的内容" decoding="async" data-original="https://pythonjishu.com/wp-content/uploads/2023/10/photo-1686191128680-caa7558da57f-480x300.jpg" /> </a> </div> <div class="item-content"> <p class="item-title"><a href="https://pythonjishu.com/ai-create-article-2/" title="根据目标受众调整AI 写作风格:有效运用人工智能技术撰写吸引读者的内容">根据目标受众调整AI 写作风格:有效运用人工智能技术撰写吸引读者的内容</a></p> <p class="item-date">2023年10月29日</p> </div> </li> <li class="item"> <div class="item-img"> <a class="item-img-inner" href="https://pythonjishu.com/ai-create-article/" title="5款中文AI文章产生器:中文写作必备「AI写作工具」快速SEO文章"> <img width="480" height="300" src="https://pythonjishu.com/wp-content/themes/justnews/themer/assets/images/lazy.png" class="attachment-default size-default wp-post-image j-lazy" alt="5款中文AI文章产生器:中文写作必备「AI写作工具」快速SEO文章" decoding="async" data-original="https://pythonjishu.com/wp-content/uploads/2023/10/photo-1686191567765-480x300.jpg" /> </a> </div> <div class="item-content"> <p class="item-title"><a href="https://pythonjishu.com/ai-create-article/" title="5款中文AI文章产生器:中文写作必备「AI写作工具」快速SEO文章">5款中文AI文章产生器:中文写作必备「AI写作工具」快速SEO文章</a></p> <p class="item-date">2023年10月29日</p> </div> </li> </ul> </div><div class="widget widget_html_myimg"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2252152819722406" crossorigin="anonymous"></script> <!-- 通用 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2252152819722406" data-ad-slot="5528197265" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script></div><div class="widget widget_lastest_news"><h3 class="widget-title"><span>热门文章</span></h3></div> </aside> </div> </div> <footer class="footer"> <div class="container"> <div class="footer-col-wrap footer-with-icon"> <div class="footer-col footer-col-copy"> <ul class="footer-nav hidden-xs"><li id="menu-item-374373" class="menu-item menu-item-374373"><a href="https://pythonjishu.com/about/">关于我们</a></li> <li id="menu-item-374372" class="menu-item menu-item-privacy-policy menu-item-374372"><a rel="privacy-policy" href="https://pythonjishu.com/privacy-policy/">隐私政策</a></li> </ul> <div class="copyright"> <div class="copyright"> <p style="text-align: left;">© 2022-2024 <strong><a href="https://pythonjishu.com/" target="_blank" rel="noopener">Python技术站</a> </strong> 保留所有权利</p> <p style="text-align: left;"><img class="" src="https://pythonjishu.com/wp-content/uploads/2023/11/baico.png" alt="baico" width="16" height="18" /> <a href="https://beian.mps.gov.cn/#/query/webSearch?code=21010502000733" target="_blank" rel="nofollow noopener noreferrer">辽公网安备21010502000733号</a> <a href="https://beian.miit.gov.cn" target="_blank" rel="nofollow noopener noreferrer">辽ICP备18014290号</a></p> <p><img class="alignleft" src="https://pythonjishu.com/wp-content/uploads/2023/11/aliprotected.png" alt="aliprotected" width="244" height="26" /></p> </div> </div> </div> <div class="footer-col footer-col-sns"> <div class="footer-sns"> <a class="sns-wx" href="javascript:;" aria-label="icon"> <i class="wpcom-icon fa fa-wechat sns-icon"></i> <span style="background-image:url('//pythonjishu.com/wp-content/uploads/2023/01/wechat-metahuber.jpg');"></span> </a> <a class="sns-wx" href="javascript:;" aria-label="icon"> <i class="wpcom-icon ri-music-fill sns-icon"></i> <span style="background-image:url('//pythonjishu.com/wp-content/uploads/2023/05/2023-05-07_20-49-41.jpg');"></span> </a> </div> </div> </div> </div> </footer> <div class="action action-style-1 action-color-1 action-pos-1" style="bottom:320px;"> <div class="action-item"> <i class="wpcom-icon fa fa-wechat action-item-icon"></i> <span>合作推广</span> <div class="action-item-inner action-item-type-1"> <img class="action-item-img" src="//pythonjishu.com/wp-content/uploads/2023/01/wechat-metahuber.jpg" alt="合作推广"> </div> </div> <div class="action-item j-share"> <i class="wpcom-icon wi action-item-icon"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> <span>分享本页</span> </div> <div class="action-item gotop j-top"> <i class="wpcom-icon wi action-item-icon"><svg aria-hidden="true"><use xlink:href="#wi-arrow-up-2"></use></svg></i> <span>返回顶部</span> </div> </div> <script type="text/javascript" id="main-js-extra"> /* <![CDATA[ */ var _wpcom_js = {"webp":"","ajaxurl":"https:\/\/pythonjishu.com\/wp-admin\/admin-ajax.php","theme_url":"https:\/\/pythonjishu.com\/wp-content\/themes\/justnews","slide_speed":"5000","is_admin":"0","lang":"zh_CN","js_lang":{"share_to":"\u5206\u4eab\u5230:","copy_done":"\u590d\u5236\u6210\u529f\uff01","copy_fail":"\u6d4f\u89c8\u5668\u6682\u4e0d\u652f\u6301\u62f7\u8d1d\u529f\u80fd","confirm":"\u786e\u5b9a","qrcode":"\u4e8c\u7ef4\u7801","page_loaded":"\u5df2\u7ecf\u5230\u5e95\u4e86","no_content":"\u6682\u65e0\u5185\u5bb9","load_failed":"\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01","expand_more":"\u9605\u8bfb\u5269\u4f59 %s"},"share":"1","lightbox":"1","post_id":"239830","user_card_height":"356","poster":{"notice":"\u8bf7\u300c\u70b9\u51fb\u4e0b\u8f7d\u300d\u6216\u300c\u957f\u6309\u4fdd\u5b58\u56fe\u7247\u300d\u540e\u5206\u4eab\u7ed9\u66f4\u591a\u597d\u53cb","generating":"\u6b63\u5728\u751f\u6210\u6d77\u62a5\u56fe\u7247...","failed":"\u6d77\u62a5\u56fe\u7247\u751f\u6210\u5931\u8d25"},"video_height":"484","fixed_sidebar":"1","dark_style":"0","font_url":"\/\/fonts.googleapis.com\/css2?family=Noto+Sans+SC:wght@400;500&display=swap","follow_btn":"<i class=\"wpcom-icon wi\"><svg aria-hidden=\"true\"><use xlink:href=\"#wi-add\"><\/use><\/svg><\/i>\u5173\u6ce8","followed_btn":"\u5df2\u5173\u6ce8","user_card":"1"}; /* ]]> */ </script> <script type="text/javascript" src="https://pythonjishu.com/wp-content/themes/justnews/js/main.js?ver=6.19.0" id="main-js"></script> <script type="text/javascript" src="https://pythonjishu.com/wp-content/themes/justnews/themer/assets/js/icons-2.7.19.js?ver=6.19.0" id="wpcom-icons-js"></script> <script type="text/javascript" id="wpcom-member-js-extra"> /* <![CDATA[ */ var _wpmx_js = {"ajaxurl":"https:\/\/pythonjishu.com\/wp-admin\/admin-ajax.php","plugin_url":"https:\/\/pythonjishu.com\/wp-content\/plugins\/wpcom-member\/","post_id":"239830","js_lang":{"login_desc":"\u60a8\u8fd8\u672a\u767b\u5f55\uff0c\u8bf7\u767b\u5f55\u540e\u518d\u8fdb\u884c\u76f8\u5173\u64cd\u4f5c\uff01","login_title":"\u8bf7\u767b\u5f55","login_btn":"\u767b\u5f55","reg_btn":"\u6ce8\u518c"},"login_url":"https:\/\/pythonjishu.com\/%e7%94%a8%e6%88%b7%e7%99%bb%e5%bd%95\/?modal-type=login","register_url":"https:\/\/pythonjishu.com\/%e7%94%a8%e6%88%b7%e6%b3%a8%e5%86%8c\/?modal-type=register","errors":{"require":"\u4e0d\u80fd\u4e3a\u7a7a","email":"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u7535\u5b50\u90ae\u7bb1","pls_enter":"\u8bf7\u8f93\u5165","password":"\u5bc6\u7801\u5fc5\u987b\u4e3a6~32\u4e2a\u5b57\u7b26","passcheck":"\u4e24\u6b21\u5bc6\u7801\u8f93\u5165\u4e0d\u4e00\u81f4","phone":"\u8bf7\u8f93\u5165\u6b63\u786e\u7684\u624b\u673a\u53f7\u7801","terms":"\u8bf7\u9605\u8bfb\u5e76\u540c\u610f\u6761\u6b3e","sms_code":"\u9a8c\u8bc1\u7801\u9519\u8bef","captcha_verify":"\u8bf7\u70b9\u51fb\u6309\u94ae\u8fdb\u884c\u9a8c\u8bc1","captcha_fail":"\u4eba\u673a\u9a8c\u8bc1\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5","nonce":"\u968f\u673a\u6570\u6821\u9a8c\u5931\u8d25","req_error":"\u8bf7\u6c42\u5931\u8d25"}}; /* ]]> */ </script> <script type="text/javascript" src="https://pythonjishu.com/wp-content/plugins/wpcom-member/js/index.js?ver=1.5.7" id="wpcom-member-js"></script> <script type="text/javascript" src="https://pythonjishu.com/wp-content/themes/justnews/js/wp-embed.js?ver=6.19.0" id="wp-embed-js"></script> <script id="module-flowchart"> (function($) { $(function() { if (typeof $.fn.flowChart !== "undefined") { if ($(".language-flow").length > 0) { $(".language-flow").parent("pre").attr("style", "text-align: center; background: none;"); $(".language-flow").addClass("flowchart").removeClass("language-flow"); $(".flowchart").flowChart(); } } }); })(jQuery); </script> <script id="module-sequence-diagram"> (function($) { $(function() { if (typeof $.fn.sequenceDiagram !== "undefined") { $(".language-sequence").parent("pre").attr("style", "text-align: center; background: none;"); $(".language-seq").parent("pre").attr("style", "text-align: center; background: none;"); $(".language-sequence").addClass("sequence-diagram").removeClass("language-sequence"); $(".language-seq").addClass("sequence-diagram").removeClass("language-seq"); $(".sequence-diagram").sequenceDiagram({ theme: "simple" }); } }); })(jQuery); </script> <script id="module-toc"> (function($) { $(function() { }); })(jQuery); </script> <script>document.getElementById('j-user-wrap').style.display="none";</script> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "@id": "https://pythonjishu.com/shtezisikkmvqnu/", "url": "https://pythonjishu.com/shtezisikkmvqnu/", "headline": "jQuery AJAX 方法success()后台传来的4种数据详解", "description": "下面是关于“jQuery AJAX 方法success()后台传来的4种数据详解”的完整攻略。 什么是AJAX? 首先,我们需要了解一下AJAX。AJAX即“Asynchronous JavaScript and XML”,是指通过JavaScript发起异步请求,从而实现在不重新加载整个页面的情况下更新页面的局部内容…", "datePublished": "2023-05-26T10:00:16+08:00", "dateModified": "2023-05-26T10:00:16+08:00", "author": {"@type":"Person","name":"Python技术站官方","url":"/1","image":"//pythonjishu.com/wp-content/uploads/2018/07/f9352ad8b4a1ce8c616fe60de409e340.jpg"} } </script> </body> </html> <!-- Cached by WP-Optimize (gzip) - https://getwpo.com - Last modified: 2024年12月18日 pm10:00 (Asia/Shanghai UTC:8) -->