📄 php_ajax_intro.asp@output=print
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>AJAX Introduction</title>
<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="Keywords" content="xml,tutorial,html,dhtml,css,xsl,xhtml,javascript,asp,ado,vbscript,dom,sql,colors,soap,php,authoring,programming,training,learning,beginner's guide,primer,lessons,school,howto,reference,examples,samples,source code,tags,demos,tips,links,FAQ,tag list,forms,frames,color table,w3c,cascading style sheets,active server pages,dynamic html,internet,database,development,Web building,Webmaster,html guide" />
<meta name="Description" content="Free HTML XHTML CSS JavaScript DHTML XML DOM XSL XSLT RSS AJAX ASP ADO PHP SQL tutorials, references, examples for web building." />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "../../https@ssl./default.htm" : "../../www./default.htm");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-3855518-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</head>
<body>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
<h1>AJAX Introduction</h1>
<a href="php_xml_simplexml.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="php_ajax_xmlhttprequest.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<hr />
<h2>AJAX = Asynchronous JavaScript And XML</h2>
<p>
AJAX is an acronym for <b>A</b>synchronous <b>J</b>avaScript <b>
A</b>nd <b>X</b>ML.</p>
<p>AJAX is not a new programming language, but
simply a new technique for creating better, faster, and more interactive web
applications.</p>
<p>
AJAX uses JavaScript to send and receive data
between a web browser and a web server.</p>
<p>
The AJAX technique makes web pages more responsive by
exchanging data with the web server behind the scenes, instead of
reloading an entire web page each time a user makes a change.</p>
<hr />
<h2>AJAX Is Based On Open Standards</h2>
<p>AJAX is based on the following open standards:</p>
<ul>
<li><b>JavaScript</b></li>
<li><b>XML</b></li>
<li><b>HTML</b></li>
<li><b>CSS</b></li>
</ul>
<p>The open standards used in AJAX are well defined, and supported by all major browsers.
AJAX applications are browser and platform independent. (Cross-Platform,
Cross-Browser technology)</p>
<hr />
<h2>AJAX Is About Better Internet Applications</h2>
<p>Web applications have many benefits over desktop applications:</p>
<ul>
<li>they can reach
a larger audience</li>
<li>they are easier to install and support</li>
<li>they are easier to develop</li>
</ul>
<p>However, Internet applications are not always as "rich" and user-friendly as
traditional desktop applications. </p>
<p>With AJAX, Internet applications can be made richer (smaller, faster, and
easier to use).</p>
<hr />
<h2>You Can Start Using AJAX Today</h2>
<p>There is nothing new to learn.</p>
<p>AJAX is based on open standards. These standards have been used by most
developers for several years.</p>
<p>Most existing web applications can be rewritten to use AJAX technology
instead of traditional HTML forms.</p>
<hr />
<h2>AJAX Uses XML And HTTP Requests</h2>
<p>A traditional web application will submit input (using an HTML form) to a web server. After the web server
has processed the data, it will return a completely new web page
to the user.</p>
<p>Because the server returns a new web page each
time the user submits input, traditional web applications often
run slowly and tend to be less user friendly.</p>
<p>With AJAX, web applications can send and retrieve data without reloading the whole web page.
This is done by sending HTTP requests to the server (behind the scenes),
and by modifying only parts of the web page using JavaScript when the server
returns data.</p>
<p>
XML is commonly used as the format for receiving server data, although any format, including
plain text, can be used.</p>
<p>You will learn more about how this is done in the next
chapters of this tutorial.</p>
<hr />
<h2>PHP and AJAX</h2>
<p>There is no such thing as an AJAX server.</p>
<p>AJAX is a technology that runs in your browser. It uses asynchronous data
transfer (HTTP requests) between the browser and the web server, allowing web pages to request
small bits of information from the server instead of whole pages.</p>
<p>AJAX
is a web browser technology independent of web server software.</p>
<p>However, in this tutorial we will focus more on actual examples running on a
PHP server, and less on <b>how</b> AJAX works.</p>
<p>To read more about how AJAX works, visit our <a href="../ajax/default.asp">AJAX
tutorial</a>.</p>
<hr />
<a href="php_xml_simplexml.asp"><img border="0" src="../images/btn_previous.gif" width="100" height="20" alt="Previous" /></a>
<a href="php_ajax_xmlhttprequest.asp"><img border="0" src="../images/btn_next.gif" width="100" height="20" alt="Next" /></a>
<p>From <b>http://www.w3schools.com</b> (Copyright Refsnes Data)</p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -