87,997
社区成员




<script>
var path="www.abc.com/sports/def.aspx";
path=path.substring(path.lastIndexOf("/")+1,path.lastIndexOf("."));
alert(path);
</script>
var fileName = document.location.pathname.replace(/.*\/|\.[^.]*$/g,'');
alert(fileName);
var url=document.location;
url = "www.abc.com/sports/def.aspx";
var r = /\/(\w+)\.aspx/;
alert(url.match(r)[1]);
alert(r.exec(url)[1]);