2026-01-06 06:55:20
window.addEventListener("load",function() {
setTimeout(function(){
window.scrollTo(0, 1);
}, 0);
});
这种是在你浏览器内容高于浏览器的时候才会有用
if(document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
bodyTag = document.getElementsByTagName('body')[0];
bodyTag.style.height = document.documentElement.clientWidth / screen.width * screen.height + 'px';
}
这个是内容没有浏览器高的情况下
综合一下:
<script>
window.onload=function(){
if(document.documentElement.scrollHeight <= document.documentElement.clientHeight) {
bodyTag = document.getElementsByTagName('body')[0];
bodyTag.style.height = document.documentElement.clientWidth / screen.width * screen.height + 'px';
}
setTimeout(function() {
window.scrollTo(0, 1)
}, 0);
};
</script>试试看吧
2026-03-13 08:03:44
自己做一个不带菜单栏和地址栏的浏览器给用户用
用户自己设置自己的浏览器,隐藏 菜单栏和地址栏
自己写个 程序,去设置用户的浏览器
请按照一下编辑程序代码。
1234567891011121314151617181920212223242526272829303132
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <BODY ><input type="BUTTON" name="FullScreen" value="全屏显示"
onClick="window.open(document.location, 'www_helpor_net', 'fullscreen')"><p>这个网页特代码实现了IE浏览器的完全全屏
</p><p style="font-size:16px; text-indent:2em; font-weight:bold;">关闭方法: 按键盘 alt+f4 不过对于火狐浏览器不能完全全仍然显示地址栏和关闭按钮。 O(∩_∩)O哈哈~</p><!--下面只是说明与程序代码无关--><div style="width:95%; height:auto; display:block; margin:0 auto; margin-top:30px; font-size:10pt; line-height:150%;">
<span>本代码由<a href="
</a> 收集整理 我要学电脑.COM →www.51xuediannao.com </span><br><a href="
</span><span>懒人建站只收录实用和能提高用户体验的代码
</span><span>我们只想解放出你的部分写代码时间来思考更高层次的设计,而不是要你懒惰、拼凑。
</span></div></BODY></HTML>
2026-03-31 00:02:40