有大神进来 ,判断手机和电脑访问 延时提示信息框并跳转到相应页面_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:34:47
Original
919 people have browsed it

这是判断手机和电脑访问的:
<script> <br />try{ <br /> if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { <br /> window.location.href="2.htm"; <br /> }else{ <br /> window.location.href="3.htm"; <br /> } <br />}catch(e){} <br /></script>



怎么做可以给上面的代码加个 延时 提示信息框  点击信息框按钮跳转到相应页面


回复讨论(解决方案)

哪就用setTimeout

跳转代码加上settimeout进行延时。。。

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