<script> var str=location.pathname; a=str.substr(str.lastIndexOf("/")+1) alert(a) a=location.pathname.replace(/(.+)[\\/]/,"") alert(a) </script>
得到當(dāng)前網(wǎng)頁(yè)名字的兩種方法