Home >Web Front-end >JS Tutorial >Javascript implementation prevents links in iOS APP from opening Safari browser_javascript skills

Javascript implementation prevents links in iOS APP from opening Safari browser_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:44:562231browse

Last time I built a Web APP for my website based on online tutorials, but it gave users a very bad feeling.

Problem description:

What’s wrong? It turns out that after opening the WEB APP and opening a connection on the homepage at will, the Safari browser will be opened on its own initiative. All the good pretense and mood were destroyed. What should we do? It turns out the solution is quite simple. Just add these codes. The experimental test passed on my iPhone (iOS 7.1) and iPod (iOS 6.1.4). According to the original author's description, the latest iOS 7.0.4 (iPhone and iPad) passed the test. The code should have good compatibility, here Share:

Problem Solved:

Copy code The code is as follows:




It is recommended to put the code before the /head tag. Of course, it is also possible to save it as a js file for reference. OK.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn