Prevents safari on iOS devices from recognizing numbers as phone numbers

Source: Internet
Author: User
ArticleDirectory
    • How do I disable automatic detection of phone numbers in webpages?

During the test, Safari on the iPad always recognizes long numbers as phone numbers, turns the text into blue, and then adds a menu to the address book.

The layout would be quite disgusting if a number appears in the user name (the user name registered on Sina Weibo via mobile phone is "mobile phone user XXXXXXXX.

After testing, the long string number in the tag will not be recognized as a phone number, so a non-action a tag is embedded in the user name but there is no link, which temporarily solves this problem.

But this adds additional labels,CodeThe semantics of this method becomes very poor, and this method cannot be used for large text segments.

Today, I accidentally bumped into the official safari website and found that safari has a private meta attribute to solve this problem:

 
<MetaName= "Format-detection"Content= "Telephone = No" />

The official website is described as follows:

How do I disable automatic detection of phone numbers in webpages?

In safari on iPhone, phone numbers are automatically detected and transformed into links that dial the phone number when tapped. if you have strings of numbers in your webpage that shocould not be automatically detected as phone numbers, you can choose to disable this feature on the entire page by addingMetaTag shown inListing 12.

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.