Reputation: 9661
i hat one task, and know i have to continue but have a bad experience with regexp ... :(
can somebody help me :
i need to take a sting from "domain url" with jquery :
This is the address name :
http://mydomain/Our-Company/default.aspx?txt=James D. Perrlo
I want to take with jquery la string after "?txt=" in this case "James D. Perrlo"
PS: This string always is ends of the url
Can somebody help me ?
Thanks !
Upvotes: 1
Views: 694
Reputation: 342635
This small URL plugin lets you do this:
var url = $.url('http://allmarkedup.com/folder/dir/index.html?item=value');
url.attr('protocol'); // returns 'http'
url.attr('path'); // returns '/folder/dir/index.html'
https://github.com/allmarkedup/jQuery-URL-Parser
Upvotes: 3