HTML page on load should open a default phone dial screen with phone number

Viewed 945

I have URL https://www.example.com/phonecall

When the user opens this link on a Mobile device (Andriod, iPhone) the page should redirect to the Phone dialer with phone number 1-999-999-9999.

I do not care so much about the desktop experience.

Any help would be great

Output

1 Answers

Try putting that in your code :

<script>
window.location = "tel:+1(999)9999999"
</script>

I actually didnt test it, but I think it is right.

EDIT : Just tested it, it perfectly worked. Basically, the "link" to open a phone dial is tel:phonenumber.

Related