摘要:
获取浏览器窗口 window.innerHeight高 window.innerWidth 宽 弹出层 alert 提示框 询问框 confirm() 返回 true 或者false prompt 输入框 地址信息 window.location.href 可读可写 reload 重新加载 =刷新 阅读全文
posted @ 2022-08-09 22:06
SmileBlog
阅读(25)
评论(0)
推荐(0)
摘要:
var time=setTimeout(要执行的函数,多长时间以后执行 单位毫秒) 注册定时器 返回句柄 setInterval(要执行的函数,多长时间以后执行 单位毫秒) 注册间隔定时器 返回句柄 clearTimeout() clearInterval() 阅读全文
posted @ 2022-08-09 21:15
SmileBlog
阅读(22)
评论(0)
推荐(0)
摘要:
new Data() GMT+0800 GTM标准时间+0800 时区 一个参数 毫秒数 1970开始加上毫秒数 两个参数 年 月 月从0开始 三个参数 年 月 日 时 分 秒 字符串 如("2020-10-10 10;20:33")或者2020/10/10 10;20:33 .getFullYea 阅读全文
posted @ 2022-08-09 21:03
SmileBlog
阅读(30)
评论(0)
推荐(0)
摘要:
.toFixed() 保留几位小数 Math.random() 随机整数 Math.round(参数) 四舍五入 ceil 向上 floor 向下 Math.ceil(参数) Math.abs(参数) 绝对值 Math.sqrt(参数) 平方根 Math.pow(底数,指数) Math.max(多个 阅读全文
posted @ 2022-08-09 20:16
SmileBlog
阅读(35)
评论(0)
推荐(0)
摘要:
//es6 var myhtml="<li></li>" \换行 ``反引号包裹 var myhtml=`<li></li> <li></li>` 无需换行 ${变量或表达式} 阅读全文
posted @ 2022-08-09 19:27
SmileBlog
阅读(19)
评论(0)
推荐(0)