Ajax02.html
Client
<!
DOCTYPE html> <!--client--<!--courseware _48. Nineth: Ajax technology [3]-on the browser-native Ajax interface (3). RAR--<!--processing the server response data--
ajax02.php
Server-side
<?php
//server side//can execute a variety of PHP code, various judgments, as well as from the database to obtain data, returned to the client
//sleep (5);
echo "Hey, this data is back to you";
Echo ' <ul>
// <li><a href= "#" > I am the headline of a news </a></li>
// <li> <a href= "#" > I am a headline of a news </a></li>
// <li><a href= "#" > I am a headline of a news </a>< /li>
// <li><a href= "#" > I am a headline of the news </a></li>
// <li><a href= "#" > I am a headline of the news </a></li>
// <li><a href= "#" > I am the headline of a news </a></li >
//</ul> ';
$str 1=<<<a
//if (1>100) {
// alert (':)) ');
}else{
// alert (':((');
}
//a;
echo $str 1;
$arr =array (
' title ' = ' This is the title of an article ', ' url ' = ' # '),
Array (' title ' = ' = ' This is the title of an article ', ' url ' = = ') Http://sifangku.com '),
Array (' title ' = ' This is the title of an article ', ' url ' = ' # '),
Array (' title ' = ' = ' This is the title of an article ', ' URL ' = = ' # ')
;
$str 2=json_encode ($arr);
echo $str 2;
? >