Mobile WAP mobile web HTML5 via special Links: Call, send SMS, email detailed tutorials

Source: Internet
Author: User

Recently, the joy in the search for mobile phone web call system text messages to send text messages to share and send information. Look for a lap, found, here to share, record a bit!

If you need to make calls in a mobile browser, call SMS, send an email, and so on, mobile Phone Web page (HTML5) JavaScript provides an interface that is a good idea.

Using the URL href link, to achieve in the Safari ios,android browser, webOS browser, Saipan browser, Ie,operamini and other mainstream browser, make phone call function.

1. Make a phone call

Precede the phone number with a + (plus sign) to indicate the international number. Such as:

The most commonly used Web page JS implementation of one-touch dialing phone dialing function

Example:

<ahref="tel:10086">10086</a>     

Make a call using the Wtai protocol

<ahref="wtai://wp/mc;10086">10086</a>     
2. Send SMS

If it is an interface that needs to invoke SMS, you can write the link in the following format:

SMS:<phone_number>[,<phone-number>]*[?  Body=<message_body;]          

For example:

 (110086  texting  :     
<ahref="sms:10086"> Send Message </a>(2) Send message to 10086 with "Cxye":<a  href="Sms:10086?body=cxye"> send messages </a>(3) Send SMS to 10086 and 10010 for "Cxye":  <ahref="Sms:10086,10010?body=cxye"> send information </a>    

3. Mail Send Message

Use mailto just like normal html

(1) Send email to [email protected]:

<ahref="mailto:[email protected">mail</a>(2) to [email protected] and [ Email protected] Send message:<ahref="mailto:[email protected],[email protected]">Mail </a>             
(2) to [email protected].  COM sendsa message with the subject "testing":      
<ahref="Mailto:[email protected]?subject=testing">mail</a> 
(2) to [email protected].  COM sends a message with the subject "testing" and copies it to [email protected].  COM:           
<ahref="Mailto:[email protected]?subject=testing mailto&[email protected]"> Mail</a>     

4. Android Market

If you want a link to activate the Android Market feature, you can write the link:

<ahref="Market://search?q=[query">Android Market link</a>  

Where <query> is the content of the search, the name of your app

Example:

<ahref="Market://search?q=myapp">MyApp</a>   
5. GPS Map Positioning
<ahref="geopoint:[longitude],[latitude]"> my location </a>     

For example:

<ahref="geopoint:108.954823,34.275891"> my location </a>

In HTML a tag is a link tag, but a tag also has a lot of kinds, here do a summary.

I. GENERAL links

<a href="http://www.baidu.com">百度</a>

second, the Mail link
1. The label is the simplest type

<a href="mailto:[email protected]">联系站长</a>

2. The label helps you to fill in the CC address

<a href="mailto:[email protected][email protected]">联系站长</a>

3. Label to help you fill out the address

<a href="mailto:[email protected][email protected]">联系站长</a>

4. Dark, copy

<a href="[email protected]">联系站长</a>

5. Tags help you fill in the theme

<a href="mailto:[email protected]?subject=给你主页提个建议">有话直说</a>

6. Fill in the contents of the message

<a href="mailto:[email protected]?body=你的网页做得不错啊,不过就是人气不够哦">评价</a>

7. Multi-homed

<a href="mailto:[email protected],[email protected]">联系站长</a>

e-Mail Link summary: Mailto after the recipient address, CC is the CC address, bcc after the BCC address, subject after the subject of the message, body after the content of the message, if there are multiple parameters after the mailto, the first parameter must be "?" Starting with, each of the following starts with "&". A complete example:

<a href="mailto:aaa@xxx.com?cc=bbb@yyy.com&bcc=ccc@zzz.com&subject=主题&body=邮件内容">发邮件</a>

Third, call
The most commonly used Web page JS implementation of one-touch dialing phone dialing function

<a href="tel:10086">10086</a>

Make a call using the Wtai protocol

<a href="wtai://wp/mc;10086">10086</a>

Iv. Sending text messages
If it is an interface that needs to invoke SMS, you can write the link in the following format:

sms:<phone_number>[,<phone-number>]*[?body=<message_body>]

Cases:
1. Send a text message to a number

<a href="sms:10086">给 10086 发短信</a>

2. Send a message to a number that has been edited

<a href="sms:10086?body=cxye">给 10086 发送内容为"cxye"的短信</a>

3. Send text messages to multiple numbers

<a href="sms:10086,10010?body=cxye">给 10086 和 10010 发送内容为"cxye"的短信</a>

Note: Text message may be garbled, this is related to the encoding format of the page, you need to change the encoding format of the page to Unicode (UTF-8). Detailed description

v. Android Market
If you want a link to activate the Android Market feature, you can write the link:

<a href="market://search?q=[query]">Android Market link</a>

Which <query> is the search for the content, the name of your app
Cases:

<a href="market://search?q=MyApp">MyApp</a>

Vi. Map GPS positioning
GPS Map Positioning

<a href="geopoint:[经度],[纬度]">我的位置</a>

Cases:

<a href="geopoint:108.954823,34.275891">我的位置</a>

Mobile WAP mobile web HTML5 via special Links: Call, send SMS, email detailed tutorials

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.