JavaScript 获取当前 URL 的文件名(不包含扩展名)

方式一 var url = "http://community.csdn.net/Expert/PostNew.asp" fileName = url.split("//")[1].split("/") file = fileName[fileName.length-1].split(".")[0] console.log(file) 方式二 var url = "http://community
相关文章
相关标签/搜索