1
我需要在的末尾指定用通配符路徑if語句.. 像*的文件系統中的等價通配符在javascript路徑
if(document.location.pathname == "/project/*") { jQuery("#regbutton").css('display','none'); };
即..中頻應該火的所有路徑開始/項目/
任何方式做到這一點瓦特/出訴訴野生正則表達式的東西?
jQuery的解決方案將是偉大的太..
日Thnx
工作流暢如絲..多thanx(這真的是非可怕的正則表達式:) – Joseph 2011-01-25 03:45:56
@約瑟夫:我編輯了我的答案;我忘了你不需要在`location.pathname`上調用`toString()`(因爲它已經是一個字符串了)[儘管你需要在``location`本身上調用`toString()`](https: //developer.mozilla.org/en/DOM/window.location#Use_as_a_string)。 – 2011-01-25 03:55:08