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: