Copiar código del código de la siguiente manera:
<!
<html xmlns = "http://www.w3.org/1999/xhtml">
<Evista>
<title> Verificación de expresión regular </title>
<script type = "text/javaScript" src = "../ scripts/jQuery-1.4.1.min.js"> </script>
<script type = "text/javaScript">
valor var = {
Istel: function (s) {
var patrn =/^((/+? 86) | (/(/+86/))?/D {3,4}-/d {7,8} (-/d {3,4})? $ /
if (! Patrn.exec (s)) Devuelve falso
Devolver verdadero
},
IsMobile: function (valor) {
var valueEg =/^((/+? 86) | (/(/+86/))? 1/D {10} $/;
Devolver valueReg.test (valor);
},
Celular: function () {
var cellPhonEnumber = $ ("#txtcellphone").
if (! Validate.ismobile (CellPhonEnumber)) {{
Alerta ("El formato del número de teléfono móvil es incorrecto");
Devolver falso;
} Demás {
Alerta ("Su formato de número de teléfono móvil es correcto");
}
},
Teléfono: function () {
var TelephoneNumber = $ ("#txttelephone").
if (! Validate.istel (TeleponEnumber)) {{
Alerta ("formato de número de teléfono incorrecto");
Devolver falso;
} Demás {
Alerta ("El formato de su número de teléfono es correcto");
}
}
}
</script>
</ablo>
<Body>
<div>
<Label> Ingrese el número de teléfono móvil (soporte +86): < /etiqueta> <input type = "text" id = "txtcellphone" /> <input type = "button" value = "verificación" onclick = "valor. celular ();
<Tabel> Ingrese el número de teléfono (soporte +86): < /etiqueta> <input type = "text" id = "txttelephone" /> <input type = "button" valor = "autenticación" onClick = "value.telephone ();
</div>
</body>
</html>