jQuery QuerystringjQuery URL參數(shù)插件
這是一個(gè)用來(lái)獲取URL中參數(shù)的jQuery插件。
語(yǔ)法:
querystring({[selector], [defaultvalue].[returndefaultifempty]})
note; [returndefaultifempty] - if true returns defaultvalue if no querystrings (in the URL) else returns defualt vaue of querystrings if no querystrings
使用方法:
獲取所有參數(shù) querystring ({selector:[{id:"*"}]})
獲取某個(gè)參數(shù) querystring({selector:[{id:"querystring name"}]})
if you want all query strings to return the same certain value when you cant find them({selector:[{id:""}]}, deafaultvalue:"hello")
if you want all query strings to return a certain indvidual value when you cant find them({selector:[{id:"", deafaultvalue:"hello"}, {id:"", deafaultvalue:"bye"}]})
the last two examples can be used togther but indvidual defaultvalues will override the global one outside the selector array.
think you can write this documentation better contact me!
