//
Original works
Original site: www.111cn.net
Author: noodles Love rabbit qq:271728967
NOTE: Reprint please explain the original out http://www.111cn.net
//
Now to talk about post.php file, post.php file is very simple, this does not necessarily use PHP can use a lot, as long as the server foot can be completed, {personal comments}
Header ("content-type:text/html;charset=gb2312"); I'm just saying that. Set the document encoding.
$key =isset ($_post[' key '])? $_post[' key ': ';
$sql = "Select title from test where title like '% $key% ' ORDER by title DESC";
$result =mysql_query ($sql) or Die (Mysql_error ());
echo "<div id=show >";
while ($rs =mysql_fetch_array ($result)) {
echo "<li onmouseover=\" this.style.background= ' #d7ebff ' "onmouseout=\" this.style.background= ' #ffffff ' " Onclick=\ "Javascript:fillin (this.innerhtml);" > "$rs [' title ']." </li> ";
}
echo "</div>";
Php+ajax to achieve Google search function two [original].
Browse Address: http://www.111cn.net/test/test.html