html onrightclick

Solutions on MaxInterview for html onrightclick by the best coders in the world

showing results for - "html onrightclick"
Kiran
16 Jan 2020
1function doSomething(e) {
2    var rightclick;
3    if (!e) var e = window.event;
4    if (e.which) rightclick = (e.which == 3);
5    else if (e.button) rightclick = (e.button == 2);
6    alert('Rightclick: ' + rightclick); // true or false
7}
8