Ctrl+/
IE11
F11
ESC
PgUp
PgDn
<html>
<head>
<title>JS获取所在网页的文件名</title>
<script>
var str=location.pathname;
a=str.substr(str.lastIndexOf("/")+1)
alert(a)
a=location.pathname.replace(/(.+)[\\/]/,"")
</script>
</head>
<body>
获取JS所在页面的文件名
</body>
</htmL>
CSS代码...
JS代码...
xxxxxxxxxx