detecting right click on windows
el.addEventListener('contextmenu', function(ev) {
ev.preventDefault();
alert('success!');
return false;
}, false);document.body.onclick = function (e) {
var isRightMB;
e = e || window.event;
if ("which" in e) // Gecko (Firefox), WebKit (Safari/Chrome) & Opera
isRightMB = e.which == 3;
else if ("button" in e) // IE, Opera
isRightMB = e.button == 2;
alert("Right mouse button " + (isRightMB ? "" : " was not") + "clicked!");
}
Also in PHP:
- Codeigniter count query results
- find array key value by check key
- PHP copy table from one database to another
- clear command for cmd
- deprcation problem phpmyadmin ubuntu
- create form request laravel
- descargar laravel
- composer set php version
- find ip address with php
- all date format in php
- delete cache file laravel
- class in php
- DATE fromat H:i j M Y
- DOMDocument is not installed on your server
- count variable lenth in php
- find a file in php
- "this" in try catch in php
- doctrine query builder order by multiple
- add one day in php
- functions returns a random number php
- find str in str php
- adding days in date, php
- array sort array reverse php
- artisan composer install