How to write a condition: if the cursor over the desired item and the right mouse button is pressed. Code:
if (незнаю что здесь писать && e.button == "2"){ ... } How to write a condition: if the cursor over the desired item and the right mouse button is pressed. Code:
if (незнаю что здесь писать && e.button == "2"){ ... } Then it’s better to put it this way: <button onmousedown="alert('Хелоу!')">нажми</button>
Write there verification e.target. Type e.target.id == 'id15' .
elem.onmouseover = elemOver; elem.onmouseout = elemOut; function elemOver() { this.over = true; //мышка над нужным еллементом } function elemOut() { this.over = false; //уже нет } Well, then I think you figure it out yourself :)
Source: https://ru.stackoverflow.com/questions/35191/
All Articles