Good morning everyone, I have a question. I have this URL: link
How can I get the 22054 parameter from that URL and assign it to a variable in JQuery?
Good morning everyone, I have a question. I have this URL: link
How can I get the 22054 parameter from that URL and assign it to a variable in JQuery?
Assuming that the element you want to capture is always in the end of the URL, you can do this:
var url = 'http://localhost/admin-ativo.com/public/evento/edit4/id_menu/8/id_evento/22054'.split('/');
var last = url.pop();
console.log(last); // 22054