> „ > WվO >

Ajax÷Ԕ

Wվ݋ 2020-03-09 20:10 / ھWվO / g

ͨ^ AJAX dһı

jQuery a

$(document).ready(function(){
  $("#b01").click(function(){
  htmlobj=$.ajax({url:"/jquery/test1.txt",async:false});
  $("#myDiv").html(htmlobj.responseText);
  });
});

HTML a

<div id="myDiv"><h2>Let AJAX change this text</h2></div>
<button id="b01" type="button">Change Content</button>
ŷzoozݽ_ŷ̫Ƭ_ŷձһ