标签:
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> 5 <title>通过jQuery AJAX改变这段文本</title> 6 <script type="text/javascript" src="js/jquery-1.11.3.js"></script> 7 <script type="text/javascript"> 8 $(document).ready(function() { 9 $(‘#btn1‘).click(function() { 10 $(‘#test‘).load(‘test_text.txt‘); 11 }); 12 }); 13 </script> 14 </head> 15 <body> 16 <h3 id="test">请点击下面的按钮,通过 jQuery AJAX 改变这段文本.</h3> 17 <button id="btn1" type="button">获得外部的内容</button> 18 </body> 19 </html>
标签:
原文地址:http://www.cnblogs.com/liubeimeng/p/5000716.html