私が次のいずれかを持っている場合:
example.com/test1
example.com/test1/
example.com/photo/test1
example.com/photo/category/test1/
(要点はわかります)
jqueryのロード時に変数としてtest1を使用するにはどうすればよいですか?
window.location.pathname
test1だけでなく/photo/category/test1/全体を教えてくれます
あなたの時間と助けに感謝します