detect right mouse click javascript
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:
- array has not key in php
- delete dduplicated from array php
- datetime in php
- end date from week number in php
- array_key_exists($x, $p)
- exception handling php'
- [WAR] 70 (lib\peer.php:164) file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- Laravel Blade Foreach If Empty or Not
- check php version linux terminal
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- check index type in php
- basic code for file upload in php
- 500 (internal server error) laravel
- explode comma php
- $db php
- array search by key in php
- eloquent where in
- check fo rtype of input php
- Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
- "Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52"
- array exists in php
- dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib Referenced from: /usr/local/bin/php Reason: image not found zsh: abort bin/console sw:cache:clear
- create folder using library in php
- date('hms'