中文(繁体)
- // 取得目前檔名function getFileName(){ var url = this.location.href var pos = url.lastIndexOf("/"); if(pos == -1){ pos = url.lastIndexOf("\") } var filename = url.substr(pos +1) return filename; }