位置: 首頁 > 設計 > 網頁設計

jQuery的load()方法及其回撥函式用法示例

2017-01-14 網頁設計

本文例項講述了jQuery的load()方法及其回撥函式用法。分享給大家供大家參考。具體如下:

下面的程式碼演示了jQuery的load()方法的使用,並演示了帶回調函式(callback)的load方法的使用

$(document)y(function(){ $("button")k(function(){ $("#div1")("demo_",function(responseTxt,statusTxt,xhr){ if(statusTxt=="success") alert("External content loaded successfully!"); if(statusTxt=="error") alert("Error: "+us+": "+usText); }); });});

  Let jQuery AJAX Change This Text

Get External Content

標籤:示例 Jquery load 函式 回撥
2016-04-16
2017-01-14
2017-01-14
2014-11-17
2014-12-05
2014-12-07
2014-12-07
2014-12-07
2014-12-05
2014-12-05

Copyright ©2024 才華齋 All Rights Reserved.