跳转的源页面:
document.referrer —— 获取上一个跳转页面的地址(需要服务器环境)
获取地址栏参数:
window.location.href —— 获取或者重定url地址
window.location.search —— 获取地址参数部分
window.location.hash —— 获取页面锚点或者叫哈希值

Math:
Math.random —— 获取0-1的随机数
Math.floor —— 向下取整
Math.ceil —— 向上取整

新增选择器:

网友评论