Summary of mobile phone number processing in WAP page

Source: Internet
Author: User

1. Prevent safari in iOS devices from identifying numbers as phone numbers

The test found that safari on the ipad always identifies long strings of numbers as phone numbers and the text turns blue. Click the pop-up menu to add to your contacts.



It's just another place. Assuming that there is a number in username (mobile phone Register Sina Weibo username is "mobile phone user xxxxxxxx"), the layout will be very disgusting.



After testing the long string of numbers in a tag is not recognized as the phone, so to appear username but no link nested a non-action a tag, temporarily overcome the problem.



However, this adds additional tags. The semantics of the code becomes very poor, and it is not possible to use this method for large pieces of text.

Accidentally crashed into Safari's official website today and found out that Safari has a private meta attribute to solve the problem:

<meta name= "format-detection" content= "Telephone=no"/>

Instructions for the official website are as follows: How does I disable automatic detection of phone numbers in webpages? In Safari on IPhone, phone numbers is automatically detected and transformed into links this dial the phone number when t apped. If you have strings of numbers in your webpage that should is automatically detected as phone numbers, you can choose To disable this feature on the entire page is adding the META tag shown in Listing 12.


2. Click to dial

<a href= "Tel: phone number" > Phone number </a>


3. Define the mobile phone number that is identified

After being identified, you are actively adding hyperlinks, and defining a tag with a child selector can


<div class= "Content" > Mobile:1300000000</div>

. Content a{color: #000;}


Mobile phone number processing summary in WAP page

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.