最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

button 事件屬性

定義和用法

button 事件屬性可返回一個(gè)整數(shù),指示當(dāng)事件被觸發(fā)時(shí)哪個(gè)鼠標(biāo)按鍵被點(diǎn)擊。

語法

event.button=0|1|2
參數(shù) 描述
0 規(guī)定鼠標(biāo)左鍵。
1 規(guī)定鼠標(biāo)中鍵。
2 規(guī)定鼠標(biāo)右鍵。

Internet Explorer 擁有不同的參數(shù):

參數(shù) 描述
1 規(guī)定鼠標(biāo)左鍵。
4 規(guī)定鼠標(biāo)中鍵。
2 規(guī)定鼠標(biāo)右鍵。

提示和注釋

注釋:對(duì)于慣用左手的鼠標(biāo)配置,上面的參數(shù)是顛倒的。

提示:Mozilla 的 Ctrl–Click 參數(shù)是 2 (等價(jià)于右擊)。

實(shí)例

The following example alerts which mouse button was clicked:

<html>
<head>
<script type="text/javascript">
function whichButton(event)
  {
    if (event.button==2)
      {
      alert("You clicked the right mouse button!")
      }
    else
      {
      alert("You clicked the left mouse button!")
      }
  }
</script>
</head>

<body onmousedown="whichButton(event)">
	
<p>Click in the document. An alert box will 
alert which mouse button you clicked.</p>

</body>
</html>

TIY

button
檢測(cè)哪個(gè)鼠標(biāo)鍵被點(diǎn)擊了。
乌恰县| 吴桥县| 霍林郭勒市| 崇礼县| 江达县| 固安县| 麦盖提县| 漳州市| 商丘市| 乐业县| 丰顺县| 云安县| 蕉岭县| 洪洞县| 昌江| 石家庄市| 隆子县| 凭祥市| 霍林郭勒市| 德令哈市| 高州市| 章丘市| 盘锦市| 固原市| 临武县| 淳化县| 永善县| 迁西县| 汝南县| 西宁市| 临沧市| 元谋县| 乌兰察布市| 财经| 汾西县| 蒙山县| 哈密市| 津南区| 噶尔县| 万州区| 永靖县|