I want to make an check in JavaScript for checking of the CTRL button is clicked. My php:
<tr class="clickable" onclick="gotolink('<?= base_url() . invoices/createinvoice/' . $customer->Id; ?>')">
my JS code:
function gotolink(url) {
if (HERE THE CHECK FOR THE CTRL BUTTON){
window.open(url,'_blank');
}
else{
location.href = url;
}
}
I don't know how to make the check. Could you help me?