php+jquery+ajax无刷新验证用户名
php+jquery+ajax无刷新验证用户名是否已存在,要一个尽量短的例子。
——解决方案——————–
今天不忙,玩玩
- HTML code
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">Insert title here <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script><script type="text/javascript">$(function(){ $("#getjson").bind("click",function(){ $.ajax({ type: "POST", url: "/index.php", data: "n来&源gao@dai!ma.com搞$代^码%网搞gaodaima代码ame="+$("#username").val(), success: function(msg){ alert(msg); } }); });})</script><body>