易发89168澳门官方_我回来-2019 长安大学 研究生

首页

AD联系:507867812

易发89168澳门官方_我回来

时间:2019-11-17 05:06:39 作者:澳门日语学习费用怎么选 浏览量:24557

易发89168澳门官方_我回来

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

,见下图

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例,见下图

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例,如下图

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

如下图

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

,如下图

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

,见图

易发89168澳门官方_我回来

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

易发89168澳门官方_我回来

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

1.

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

2.

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

3.ajax+php实现无刷新验证手机号的实例。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

4.ajax+php实现无刷新验证手机号的实例。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

ajax+php实现无刷新验证手机号的实例

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

。易发89168澳门官方_我回来

展开全文
相关文章
澳门小型进口冷却塔

ajax+php实现无刷新验证手机号的实例

甘肃承接娱乐网站收费标准

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

....

迅雷电玩城兑换码领取

ajax+php实现无刷新验证手机号的实例....

20_10_花花娱乐斗地主

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

....

澳门进口导热油炉哪家好

ajax+php实现无刷新验证手机号的实例....

相关资讯
番禺富豪山庄

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

....

天下彩天空彩票免费资料大会下载

一款简单的无刷新验证手机号是否注册:

客户端实现:

<!DOCTYPE html><html><head><meta charset="utf-8"><style>#btn{width:80px;height:30px;}</style></head><body><form> 请输入手机号:<input type="text" id="name" name="name"><input type="button" onclick="show()" id="btn" value="验证"></form><p id="txt"></p><script>var usernamereg = /^1(3|4|5|7|8)\d{9}$/;function show(){var name=document.getElementById("name").value;var xmlHttp=new XMLHttpRequest();var url="post.php";xmlHttp.onreadystatechange=function stateChanged() { if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ if(!usernamereg.test(name)){ document.getElementById("txt").innerHTML="手机号有误";}else{ document.getElementById("txt").innerHTML=xmlHttp.responseText } }}xmlHttp.open("POST",url,true);xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.send("name=" + name);} </script></body></html>

服务端实现:

<?php$con = mysqli_connect('localhost', 'username', 'password');if(! $con ){ die('连接失败: ' . mysqli_error($con));}mysqli_select_db($con,'bdm256727651_db');$username = "select userName FROM Forms where userName = '$_POST[name]' ";$result = mysqli_query($con,$username );$rows=mysqli_num_rows($result);if($rows){echo "手机号已注册";exit;}else{echo "手机号可用";}mysqli_close($con)?>

以上这篇ajax+php实现无刷新验证手机号的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

....

热门资讯