HTTP & AJAX# 06.HTTP & AJAX # 19 décembre 2023 ## Développement web il3 HTTP & AJAX HE-Arc (DGR) 2022 ## HyperText Transfer Protocol • Protocole application : invention www en 1990 (v0.9) - Connexion 1999 pour OWA) - Fetch API • Pas obligatoire d'avoir du JS, XML ni d'être asynchroné! ## AJAX • XHR est devenue la méthode standard jusqu'à 2018 – Popularisée par Google (GMaps, GMail, { $("button").click(function() { $("#div1").load("demo_test.txt"); });Let jQuery AJAX Change This Text
• Tester $ ^{12} $ • D'autres0 码力 | 11 页 | 91.09 KB | 2 年前3
《Slides Dev Web》 07. jQuery
CSS – Réponse aux évenements du navigateur - Effets visuels et animations - Requêtes et réponses Ajax • Abstraction implémentations différents navigateurs • Facile à apprendre • Utilisation du chaîne load, resize, scroll, unload • Exemple $(p).click(function() { // code à exécuter ici }); AJAX $ ^{5} $ • $(selector).load(URL, data, callback) - URL : Ressource ciblée par la requête - data callback : fonction de rappel avec 3 paramètres : 5thhttps://www.w3schools.com/jquery/jquery_ajax_load.asp * responseTxt * statusTxt * xhr • $.get(URL, callback) • $.post(URL, data, callback)0 码力 | 5 页 | 49.45 KB | 2 年前3
RxJS TutorialConditional Operators ..... 24 Multicasting Operators ..... 25 Error Handling Operators ..... 26 ajax ..... 26 from ..... 27 fromEvent ..... 28 fromEventPattern ..... 29 interval ..... 30 of going to discuss in Creation operator category: |Operator|Description| |---|---| |ajax|This operator will make an Ajax request for the given URL.| |from|This operator will create an observable from an input count given.| ## ajax This operator will make an Ajax request for the given URL. To work with Ajax we need to import it first as follows: import { Ajax } from 'rxjs/ajax'; Let us see an0 码力 | 106 页 | 1.56 MB | 2 年前3
廖雪峰JavaScript教程6.2 操作DOM 6.2.1 更新DOM 6.2.2 插入DOM 6.2.3 删除DOM 6.3 操作表单 6.4 操作文件 6.5 AJAX 6.6 Promise 6.7 Canvas 7 jQuery 7.1 选择器 7.1.1 层级选择器 7.1.2 查找和过滤 好处要等到后面学了AJAX以后才能体会到。 没有generator之前的黑暗时代,用AJAX时需要这么写代码: 1. ajax('http://url-1', data1, function (err, result) { 2. if (err) { 3. return handle(err); 4. } 5. ajax('http://url-2' function (err, result) { 6. if (err) { 7. return handle(err); 8. } 9. ajax('http://url-3', data3, function (err, result) { 10. if (err) { 11.0 码力 | 264 页 | 2.81 MB | 1 年前3
ThinkJS 1.2 中文文档post(key) 获取 post 参数值 file(key) 获取 file 参数值 isGet() 当前是否是 get 请求 isPost() 当前是否是 post 请求 - isAjax() 是否是 Ajax 请求 ip() 获取请求用户的 ip • redirect(url) 跳转到一个 url,返回一个 pedding promise 阻止后面的逻辑继续执行 • echo(data) 输出数据,会自动调用 // 返回的可以是个 promise } module.exports = { form_parse: [xmlParse] } ## 上传的文件 ThinkJS 支持表单文件上传和 Ajax 文件上传 2 种方式,解析后的数据放在 http.file 对象里,Controller 里直接使用 file 方法获取即可。 表单文件上传 表单文件上传可以指定如下的配置参数: js post_max_file_size: 单个表单长度最大值,默认为 2MB post_file_upload_path: APP_PATH + '/Runtime/Temp', // 文件上传的临时目录 ## ajax 文件上传 高级浏览器下支持使用 ajax 来上传单个文件,如: js var xhr = new XMLHttpRequest(); xhr.onreadstatechange = function(e) {0 码力 | 104 页 | 1.29 MB | 2 年前3
Java 应用与开发 - Java EE 体系结构OOA/OOD/OOP,Java、C# 面向组件 软件系统是由许多小的组件构建和装配起来的 采用标准规范开发 J2EE, MS.NET 全面采用框架技术 Struts、Spring、Hibernate、AJAX、WebWork 软件系统采用分层结构和设计模式 MVC 工厂化流水线开发模式 CVS 可视化软件建模 UML、RUP、ROSE ## 软件开发现状 面向 Internet 开发企业级 Web OOA/OOD/OOP,Java、C# 面向组件 软件系统是由许多小的组件构建和装配起来的 采用标准规范开发 J2EE、MS.NET 全面采用框架技术 Struts、Spring、Hibernate、AJAX、 WebWork 软件系统采用分层结构和设计模式 MVC 工厂化流水线开发模式 CVS 可视化软件建模 UML、RUP、ROSE ## 软件开发现状 面向 Internet 开发企业级 OOA/OOD/OOP,Java、C# 面向组件 软件系统是由许多小的组件构建和装配起来的 采用标准规范开发 J2EE、MS.NET 全面采用框架技术 Struts、Spring、Hibernate、AJAX、 WebWork 软件系统采用分层结构和设计模式 MVC 工厂化流水线开发模式 CVS 可视化软件建模 UML、RUP、ROSE ## 软件开发现状 面向 Internet 开发企业级0 码力 | 40 页 | 1.89 MB | 2 年前3
Learning Laravelin AJAX.....179 Introduction.....179 Examples.....179 Setup Token on Header.....179 Set token on tag.....179 Check session storage path & permission.....179 Use _token field on Ajax... ModelNotFoundException. if ($e instanceof ModelNotFoundException) { // Ajax 404 json feedback if ($request->ajax()) { return response()->json(['error' => laravel-datatables This package is created to handle server-side works of DataTables jQuery Plugin via AJAX option by using Eloquent ORM, Fluent Query Builder or Collection. Read more about this here or here0 码力 | 216 页 | 1.58 MB | 2 年前3
CakePHP Cookbook 2.x
CakePHP comes with a set of view helpers that make things like linking, form output, JavaScript and AJAX a snap. You can learn more about how to use them in Helpers, but what’s important to note here is single argument, which can be the request METHOD (get, put, post, delete) or some request identifier (ajax). It is not a way to check for specific posted data. For instance, $this->request->is('book') will presentational logic to be accessed and shared between views. One of the core helpers, JsHelper, makes AJAX requests within views much easier and comes with support for jQuery (default), Prototype and Mootools0 码力 | 1096 页 | 958.62 KB | 2 年前3
The Definitive Guide to Yii 2.0any layout, and injects all registered JS/CSS scripts and files. It is usually used in response to AJAX Web requests. - renderFile(): renders a view specified in terms of a view file path or alias. - named view and injects all registered JS/CSS scripts and files. It is usually used in response to AJAX Web requests. - renderFile(): renders a view specified in terms of a view file path or alias. For requested from another domain outside the domain the resource originated from. In particular, JavaScript’s AJAX calls can use the XMLHttpRequest mechanism. Such “cross-domain” requests would otherwise be forbidden0 码力 | 605 页 | 2.47 MB | 2 年前3
Yii 2.0 权威指南- renderPartial(): 渲染一个 视图名 并且不使用布局。 - renderAjax(): 渲染一个 视图名 并且不使用布局,并注入所有注册的JS/CSS脚本和文件,通常使用在响应AJAX网页请求的情况下。 - renderFile(): 渲染一个视图文件目录或别名下的视图文件。 - renderContent(): renders a static string by embedding w component视图组件提供的以下方法: - render():渲染一个视图名. - renderAjax(): 渲染一个 视图名 并注入所有注册的JS/CSS脚本和文件,通常使用在响应AJAX网页请求的情况下。 - renderFile(): 渲染一个视图文件目录或别名下的视图文件。例如,视图中的如下代码会渲染该视图所在目录下的 _overview.php 视图文件,记住视图中 $this ]; } 跨域资源共享 CORS $ ^{19} $ 机制允许一个网页的许多资源(例如字体、JavaScript等)这些资源可以通过其他域名访问获取。特别是 JavaScript 的 AJAX 调用可使用 XMLHttpRequest 机制,由于同源安全策略该跨域请求会被网页浏览器禁止。CORS 定义浏览器和服务器交互时哪些跨域请求允许和禁止。 Cors filter 应在授权/认证过滤器之前定义,以保证0 码力 | 537 页 | 4.66 MB | 2 年前3
共 746 条
- 1
- 2
- 3
- 4
- 5
- 6
- 75













