Can jQuery detect a specific URL and perform a function based off that URL?

后端 未结 3 808
Happy的楠姐
Happy的楠姐 2021-01-15 03:24

I have a site I\'m working on. I need to be able to perform a specific function if the URL matches a specific URL. Here\'s an example of what I\'m trying to do:

If

3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-15 03:54

    You seem to be looking for the location object, which contains information about the URL of the current page.

提交回复
热议问题