Rumah >pembangunan bahagian belakang >tutorial php >登记页面对应的函数得不到文本控件的值
注册页面对应的函数得不到文本控件的值
注册页面对应的函数:
<br />$.post('{:U("Register/register")}', $('#register'), function(str) { // .serialize()<br />
<br />//注册<br /> public function register() { <br /> $data['u_username'] = strtolower(I('name', '', 'trim'));<br /> $data['u_phone'] = I('phone', '', 'trim');<br /> $data['u_email'] = I('email', '', 'trim');<br /> $data['u_password'] = I('pass');<br /> $data['repassword'] = I('rpass');<br /> $rpass = I('rpass');<br /> ... ...<br />
<br />if (email === 0 || phone === 0 || code === 0 || username === 0 || password === 0 || rpassword === 0) {<br />...<br />
<br />if (document.getElementById("email").value === 0 || document.getElementById("phone").value === 0 || document.getElementById("code").value === 0 || document.getElementById("username").value === 0 || document.getElementById("password").value === 0 || document.getElementById("rpassword").value === 0) {<br />
<br /><input name="email" id="email" maxlength="30" /><br />