javascript - Grab url parameter with jquery and put into input -


i trying grab specific paramater url such www.internets.com?param=123456

i trying this..

$j.extend({   geturlvars: function(){    return window.location.href.slice(window.location.href.indexof('?')).split(/[&?]{1}[\w\d]+=/);   } }); var allvars = $j.geturlvars('param'); 

the weird thing variable returning comma in example looks ,123456

where coming from?!

split returns array of substrings, comma coming serialization of array.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -