Javascript: prevents links in iOSAPP from opening Safari _ javascript skills

Source: Internet
Author: User
This article mainly introduces how to implement javascript to prevent links in iOSAPP from opening the Safari browser. This IOSAPP is generally a WebAPP. Otherwise, the code in this article cannot be used, you can refer to the previous online tutorial to get a Web APP for your website, but it is very bad for users.

Problem description:

What's wrong? It turns out that when you open the web app and open the connection on the home page at will, you will open the Safari browser on your own. In the past, good disguise and mood were all destroyed. How can this be done? The original solution is very simple. Just add the code. The test passed on my iPhone (iOS 7.1) and iPod (iOS 6.1.4). According to the original author, the latest iOS 7.0.4 (iPhone and iPad) test passed, the code should have good compatibility. Here we will share:

Solution:

The Code is as follows:


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.