//获取网页文件名 var pathname=location.pathname; var htmlFileName=pathname.substr(pathname.lastIndexOf("/")+1);