Home > Web Front-end > JS Tutorial > Javascript custom function to determine whether the website access type is PC or mobile terminal_javascript skills

Javascript custom function to determine whether the website access type is PC or mobile terminal_javascript skills

WBOY
Release: 2016-05-16 17:04:30
Original
998 people have browsed it

Since many mobile terminals do not support Flash, many colorful Flash effects cannot be produced. If it is possible to determine the type of accessed Web page (PC or mobile terminal). You can prescribe the right medicine and find a solution!

If the access type is a mobile terminal, we will use .gif instead of Flash (.swf suffix) animation, and there will be no changes on the PC side. This is more perfect!

As shown below, the function flashChecker() is used to detect the type of access.

Copy code The code is as follows:



Extension:
Copy code The code is as follows:


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template