Heim >Backend-Entwicklung >PHP-Tutorial >php验证码
<title>用户注册</title><meta http-equiv="Content-Type" content="text/html;charset=utf-8"><script language="javascript">function check(){ if(myform.username.value == "") { alert("用户名不能为空!"); myform.username.focus(); return false; } if(myform.pwd.value == "") { alert("密码不能为空!"); myform.pwd.focus(); return false; } if(myform.ccode.value == "") { alert("验证码不能为空!"); myform.ccode.focus(); return false; } return true;}</script>