I have a link which return form with different ID’s, and i need to get ID number from onclick attribute
<a onclick="return package_order(14400287396);" href="javascript:;">advanced</a>
<a>doit</a>
this jquery code:
var pack = $('a:contains("advanced")').attr("onclick");
$('a:contains("doit")').click(function(){
alert(pack)
and i get:
function onclick(event) {
return package_order(14400287396);
}
but i need only id number inside()
should i use regular expression to do it? or what?
Extracted ‘id’ from
onclickattribute is this: