Home  >  Article  >  Web Front-end  >  我做了一个置顶,为什么火狐打开就能用,其他浏览器就不能用。为什么这个置顶代码一旦申明文档类型就失效呢。下面是代码_html/css_WEB-ITnose

我做了一个置顶,为什么火狐打开就能用,其他浏览器就不能用。为什么这个置顶代码一旦申明文档类型就失效呢。下面是代码_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:26:06872browse



无标题文档
<script> <br /> var timer <br /> function scrolltop() <br /> { <br /> document.getElementById('scrollmenu').style.top=document.body.scrollTop <br /> timer=setTimeout("scrolltop()",1) <br /> } <br /> function stoptimer() <br /> { <br /> clearTimeout(timer) <br /> } <br /> </script>







滚动页面,就可以看到“置顶”的菜单。

























































































































































































































































































































































































































































































































































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