php+jquery+ajax无刷新验证用户名
php+jquery+ajax无刷新验证用户名是否已存在,要一个尽量短的例子。
------解决方案--------------------
今天不忙,玩玩
a style="color:#f60; text-decoration:underline;" title= "html"href="https://www.php.cn/zt/15763.html" target="_blank">html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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><input type="text" id="username"><button id="getjson">获取</button>
<div class="clear"></div>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号