Micro-website, mobile phone page one-touch dialing call and send SMS function JS code
The use of URL links, in the mainstream browser to make a key call and text messaging functions.
1. The most commonly used mobile Site page JS implementation of one-touch dialing phone calls function:
<a href= "tel:4000755827" > one-touch dialing </a>
After clicking the link, it automatically jumps to the dial-up interface, displays the number, and prompts for a call.
Support most browsers, but the support is not good on QQ browser.
Micro Web site now appear to block this regular dialing JS function, the specific solution is as follows:
A, the site's one-touch dialing code is still unchanged.
b, open the Dial-up page to do the next URL processing, the Dial page after the URL to add an anchor node mp.weixin.qq.com. (It is estimated that the browser is based on the domain name to determine whether to block Tel:.) )
2. The most commonly used mobile website HTML5 implementation of a key to send SMS features:
<a href= "sms:13590101760" > send SMS Consultation </a>
Click, jump to the text message entry interface, the recipient for the page fill in the number, input text messages can be directly clicked send.
Support most browsers, but the support is not good on QQ browser.
3. Mobile phone Web page automatic detection phone number
<meta name= "format-detection" content= "Telephone=no" >
<meta http-equiv= "X-rim-auto-match" content= "None" >
4. Make a call using the Wtai protocol.
The code looks like this:
Instance:
<a href= "wtai://wp//mc;13590101760" > Call </a>
<a href= "wtai://wp/ap;13590101760;" > Save phone numbers to phone book </a>
Phone Page one-touch dialing