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