xxxxxxxxxx
<html lang="en">
<head>
<title>HTML5 Tel Input Type</title>
<script>
function getValue() {
var phone = document.getElementById("myphone").value;
alert(phone);
}
</script>
</head>
<body>
<form>
<label for="myphone">Telephone Number:</label>
<input type="tel" id="myphone" placeholder="xx-xxxx-xxxx" required>
<button type="button" onclick="getValue();">Get Value</button>
</form>
</body>
</html>