Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个文件列表页面。在该页面中,用户可以在单击文件名时重命名。当前单击文件名会打开一个输入框,在该文件名中突出显示其扩展名。我只想关注文件名,这样用户就不会重命名文件扩展名。任何人都可以在 jquery 中帮助我吗
尝试这个
var output = filename1.substr(0, filename1.lastIndexOf('.'))