Heim >Backend-Entwicklung >PHP-Tutorial >PHP有关问题请问
PHP问题请教
<br /> <tr><br /> <td style="text-align:right;"><span class="cred1">*</span> 联系电话: </td><br /> <td style="text-align:left;"><input type="text" id="user_phone" name="user_phone" onblur="check_phone()" value="" class="inputall input150"> <span id="user_phone_show"></span></td><br /> </tr><br /> <script type="text/javascript"><br /> function check_phone(){<br /> var s = document.getElementById("user_phone").value;<br /> var pattern = new RegExp("^\\d{11}$");<br /> if(!pattern.test(s)){<br /> document.getElementById("user_phone_show").innerHTML = '联系电话輸入不正確';<br /> }else{<br /> document.getElementById("user_phone_show").innerHTML = '';<br /> }<br /> }<br /> </script><br /><br />
<tr><br /> <td style="text-align:right;"><span class="cred1">*</span> 联系电话: </td><br /> <td style="text-align:left;"><input type="text" id="user_phone" name="user_phone" onblur="check_phone()" value="" class="inputall input150"> <span id="user_phone_show"></span></td><br /> </tr><br /> <script type="text/javascript"><br /> function check_phone(){<br /> var s = document.getElementById("user_phone").value;<br /> var pattern = new RegExp("^1[3<br><font color='#FF8000'>------解决思路----------------------</font><br>5<br><font color='#FF8000'>------解决思路----------------------</font><br>7<br><font color='#FF8000'>------解决思路----------------------</font><br>8<br><font color='#FF8000'>------解决思路----------------------</font><br>][0-9]{9}$");<br /> if(!pattern.test(s)){<br /> document.getElementById("user_phone_show").innerHTML = '手机号输入不正确';<br /> }else{<br /> document.getElementById("user_phone_show").innerHTML = '正确';<br /> }<br /> }<br /> </script>
array('tel',"^(130<br><font color='#FF8000'>------解决思路----------------------</font><br>131<br><font color='#FF8000'>------解决思路----------------------</font><br>132<br><font color='#FF8000'>------解决思路----------------------</font><br>133<br><font color='#FF8000'>------解决思路----------------------</font><br>134<br><font color='#FF8000'>------解决思路----------------------</font><br>135<br><font color='#FF8000'>------解决思路----------------------</font><br>136<br><font color='#FF8000'>------解决思路----------------------</font><br>137<br><font color='#FF8000'>------解决思路----------------------</font><br>138<br><font color='#FF8000'>------解决思路----------------------</font><br>139)\d{8}$",'手机格式不正确'),