In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use Ajax to verify user names, with certain reference value, interested friends can refer to, I hope you have a lot of gains after reading this article, let Xiaobian take you to understand.
The code to validate the username with Ajax looks like this:
Interface:
getguestbook/index.phpm : indexa : verifyUserNameusername : username to verify
return
{code: returned message code 0 = no error, 1 = error message : returned message specific returned message}
js
oUsername1.onblur = function() { //When losing focus, give the current username to the backend to verify Ajax ('get ', ' guestbook/index.php','m=index&a=verifyUserName&username ='+ this.value, function(data) {//alert(data); browser debug view var d = JSON.parse(data); //parse oVerifyUserNameMsg[xss_clean] = d.message;//return information to the page if (d.code) { //code : returned message code 0 = no error, 1 = error oVerifyUserNameMsg.style.color ='red '; //error message plus red} else {oVerifyUserNameMsg.style.color ='green'; //correct message plus green});} Thank you for reading this article carefully, I hope Xiaobian shared "How to use Ajax to verify user name" This article is helpful to everyone, but also hope that everyone will support more, pay attention to industry information channels, more relevant knowledge waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.