移动端巧用href属性

摘要:整理汇总一些常用的href标签

打电话

在电话号码前面可以加上 + (加号)表示国际号码。如:

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

发短信

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

发送邮件

<a href="mailto:test1@163.com">mail</a>

<a href="mailto:test1@163.com,test2@126.com">mail</a>

<a href="mailto:test1@163.com?subject=Testing">mail</a>

<a href="mailto:test1@163.com?subject=Testing mailto&cc=test3@126.com">mail</a>

激活安卓市场

 <a href="market://search?q=[query]">Android Market link</a>//query是搜索内容
 <a href="market://search?q=MyApp">MyApp</a>

GPS

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