做了个小小的AJAX小测试..
把这二个文件放到TOMCAT的root目录下.
在浏览器打开ajaxtest.html,然后双击链接,就会刷新局部页面 :)
<!--ajaxtest.html-->
"http://www.w3.org/TR/html4/strict.dtd">
This page demonstrates the use of Asynchronous Javascript. and XML (Ajax) technology to
update a web page's content by reading from a remote file dynamically -- no page reloading
is required. Note that this operation does not work for users without JavaScript. enabled.
This is some sample data. It is the default data for this web page. title="View the XML data." nclick="ajaxRead('data.xml'); this.style.display='none'; return false">View XML data.
<!--data.xml-->
This is other sample data. It is stored in an XML file and retrieved by JavaScript.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12443821/viewspace-775/ ,如需转载,请注明出处,否则将追究法律责任。