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
WBOYOriginal
2016-05-16 17:04:30995browse

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:


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