会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hngbk
博客园
首页
新随笔
联系
管理
订阅
2017年5月24日
平滑滚动
摘要: //平滑滚动 12.5.24未完 <html> <style> *{ padding:0px; margin:0px; } html,body,div{ height:100%; } </style> <body> <div style='background-color:red'></div> <
阅读全文
posted @ 2017-05-24 23:56 hngbk
阅读(129)
评论(0)
推荐(0)
2017年5月23日
一次滚一屏
摘要: //demo <style> html,body {height:100%;} body {margin:0px;} div {height:100%;}</style><body> <div style="background:red;"></div> <div style="background
阅读全文
posted @ 2017-05-23 22:35 hngbk
阅读(185)
评论(0)
推荐(0)
2017年5月22日
取二维数组最大值
摘要: //取二维数组最大值 var test=[[1,34],[456,2,3,44,234],[4567,1,4,5,6],[34,78,23,1]]; //1. junior function getMaxOne(arr){ var tmp=[]; for(var i=0;i<arr.length;i
阅读全文
posted @ 2017-05-22 23:03 hngbk
阅读(1204)
评论(0)
推荐(0)
2017年5月18日
动态加载JavaScript
摘要: 动态加载JavaScript减少不必要的文件加载,提高网页浏览速度 <!DOCTYPE html> <html><meta charset='utf8'><body><input type='button' value='动态加载JavaScript' onclick='loadJS()'></bo
阅读全文
posted @ 2017-05-18 23:41 hngbk
阅读(177)
评论(0)
推荐(0)
2017年5月17日
防止网页载入框架中
摘要: window.top引用顶层框架 if(top!=self){ //当当前非顶层框架,当前页面跳转 top.location.href=self.location.href; }
阅读全文
posted @ 2017-05-17 22:18 hngbk
阅读(157)
评论(0)
推荐(0)
window对象
摘要: 网页刷新 window.location.reload() (头部<meta http-equiv='refresh' content='10'> 实现自动刷新) window.history length 历史数量 window.history.back window.history.forwar
阅读全文
posted @ 2017-05-17 22:08 hngbk
阅读(98)
评论(0)
推荐(0)
公告