0
Guys I have the following url:
http://localhost:27903/detalhes.aspx?id=3014953&stars=70
I need to get the separate parameters, id and Stars, some hint I’ve tried everything, follow my code:
$('tbody#corpo2').append(
'<tr><td style="border:solid 1px #ccc; text-align:center">' + location.search.substring(4) + '</td>'
+ '<td style="border:solid 1px #ccc">' + "teste" + '</td>'
+ '<td style="border:solid 1px #ccc">' + location.search.substring(17).replace("s=", "").replace("=","") + ' </td>' + '</tr>');
});
Note: Location.search.substring(4) takes everything up to the end of the URL, it would be possible to limit it to pick up the &?
– anderson seibert