0
我想從這個計算器適應這種相同的方法:
How to disable the 'save image as' popup for smartphones for <input>HTML5遊戲如何禁用上下文菜單時長按
我現在面臨一個問題,我的按鈕不會顯示在所有。
我的HTML按鈕
<div id="right" style="margin-right: 50px;" class="socialNetworkNav">
<!-- Add a Anchor tag with nested img tag here -->
<input type="image" src="images/UXwr4.png">
</div>
我已經JavaScript函數爲onclick
和longpress
。
我在計算如何處理longpress,因此它不顯示上下文菜單來保存圖像。
我也試過這種方式還沒有運氣,在上下文菜單中仍然出現
HTML:
input type="button" class="buttonimg" >
CSS:
.buttonimg{
background-img : url (....png);
}
我試過contenxtmenu返回false,但是在移動時。我甚至不能觸發按鈕,也沒有onclick – FreedomPride
你是說當你在移動設備上的contextmenu上返回false時,它不會點擊?我不認爲移動瀏覽器可以理解這個事件,可能還有別的。 – paulitto
yeap,我試圖弄清楚如何不擊敗onclick的功能。這很奇怪。但在網絡瀏覽器上,它會工作。 – FreedomPride