am o definitie asa:
Cod: Selectaţi tot
$re_html .='<td > <a href="javascript:clicrezervare(this);" class="confirmation" id="confirmation" >Rezerva_loc_18</a></td>';
Am incercat cu "e.innerHTML", cu "e.HTML", cu "e.value" dar nu merge. Multumesc.
Cod: Selectaţi tot
$re_html .='<td > <a href="javascript:clicrezervare(this);" class="confirmation" id="confirmation" >Rezerva_loc_18</a></td>';
Cod: Selectaţi tot
<a href="#" onclick="return clicrezervare(this);" class="confirmation" id="confirmation">Rezerva_loc_18</a>
<script>
function clicrezervare(e) {
var estr = e.innerHTML;
estr = estr.match(/_([^_]+)$/i)[1]; // get the part after last "_" in estr
// test
alert(estr); // 18
return false;
}
</script>