文档介绍:jQuery 实现异步处理用户注册数据库代码: <> <?php $conn = mysql_connect ( "localhost" , "root" , "" ) or die ( "connect error" ); mysql_select_db ( "meal" , $conn ) or die ( "connect error" ); mysql_query ( "set names 'UTF8'" ); ?> 主体页面的功能:当点击注册按钮后在页面底下区域显示用户注册。外框代码: <> <?php include_once ( "" ); ?> <style type = "text/css" > <!-- #all { border:1px solid black; width:400px; background-color: #808080 ; } #title { margin-left:300px; margin-top:10px; } #title a{ text-decoration:none; color:black; } #area { border:0px solid black; margin-top:10px; width:400px; height:300px; } --> </style> <script language = "javascript" type = "text/javascript" src = "/example/jquery-" ></script> <script language = "javascript" type = "text/javascript" src = "/example/" ></script> <div id = "all" > <div id = "title" > <a href = "#" id = "reg" > 注册</a> <a href = "#" id = "log" > 登录</a> </div> <div id = "area" > </div> </div> 用户注册页面代码: <> <?php include_once ( "../" ); ?> <style type = "text/css" > <!-- #userreg { border:1px solid black; width:380px; height:200px; margin:10px; background-color:orange; } #list { border:0px solid black; width:350px; height:100px; margin:10px; padding:10px; } #list input { width:120px; height:24px; margin-top:10px; } #button { border:0px solid black; height:50px; width:350px; margin:10px; } #button input { width:50px;