php+jquery+ajax无刷新验证用户名 php+jquery+ajax无刷新验证用户名是否已存在,要一个尽量短的例子。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 今天不忙,陪你<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title><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: "name="+$("#username").val(), success: function(msg){ alert(msg); } }); });})</script></head><body><input type="text" id="username" /><button id="getjson">获取</button></body></html>//index.phpif(isset($_POST["name"])){//写你自己的验证规则 if($_POST["name"] == "hello") echo "success"; else echo "fail";} 今天不忙,玩玩<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Insert title here</title><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: "name="+$("#username").val(), success: function(msg){ alert(msg); } }); });})</script></head><body><input type="text" id="username" /><button id="getjson">获取</button></body></html>//index.phpif(isset($_POST["name"])){//你自己的规则 if($_POST["name"] == "hello") echo "success"; else echo "fail";} <script type="text/javascript">function check(){$(function(){ $("#getjson").bind("click",function(){ $.ajax({ type: "POST", url: "/index.php", data: "name="+$("#username").val(), success: function(msg){ alert(msg); 此处获得返回值后如何在function check()里return false? } }); });})}</script> s sdf s ecshop中如何实现以旧换新 PHP查询而且要排名 php源码学习的问题 PHP中title如何动态显示当前文章的标题? 求所见及所得的编辑器 fckedit 上传的图片设置,求助 win2003下的apache 2.2.6,如何能随系统重启而自动启动? 在线结贴。大神们看看这个<pre>标签 php能否实现SHA1WithRSA算法数字签名 php ci .bin.gz 文件上传 asp 怎么转php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<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: "name="+$("#username").val(),
success: function(msg){
alert(msg);
} });
});
})
</script>
</head>
<body>
<input type="text" id="username" /><button id="getjson">获取</button>
</body>
</html>
//index.php
if(isset($_POST["name"])){
//写你自己的验证规则
if($_POST["name"] == "hello")
echo "success";
else
echo "fail";
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<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: "name="+$("#username").val(),
success: function(msg){
alert(msg);
} });
});
})
</script>
</head>
<body>
<input type="text" id="username" /><button id="getjson">获取</button>
</body>
</html>//index.php
if(isset($_POST["name"])){
//你自己的规则
if($_POST["name"] == "hello")
echo "success";
else
echo "fail";
}
function check(){$(function(){
$("#getjson").bind("click",function(){
$.ajax({
type: "POST",
url: "/index.php",
data: "name="+$("#username").val(),
success: function(msg){
alert(msg); 此处获得返回值后如何在function check()里return false? } });
});
})}
</script>