javascript - Check URL and running function? -
have question regarding url , jquery or javascript.
how running script if domain bar equivalent www.example.com ?
the script run if domain bar equivalent www.example.com , sub url too, illustration www.example.com/suba, www.example.com/subb.
can specify url tell jquery run function?
sorry bad english language :d
thanks
millions of tutorials online.
so need to:
1 check right url: utilizewindow.location.href
or window.location
property 2 run function if needed: if(condition) functionname();
this should in end:
if (window.location.href.indexof('www.example.com') != -1) { // run script here }
javascript jquery url
No comments:
Post a Comment