认真写好每一篇,愉悦自己,也方便他人
获取文件后缀
var pathname = “js/jquery.min.js”
var ext = pathname.substr(pathname.lastIndexOf('.') + 1)
拷贝整个html源代码
//拷贝整个文档
document.documentElement.outerHTML
//拷贝某个节点
document.querySelector("selector").outerHTML
刷新页面
history.go(0)
location.reload()
location=location
location.assign(location)
document.execCommand('Refresh')
window.navigate(location)
location.replace(location)
document.URL=location.href