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