当前位置首页 > 百科> 正文

button

2019-07-12 20:07:52 百科
button

button

button n. 按钮,纽扣

HTML <button> 标籤

音标:['bʌt(ə)n]

基本介绍

  • 中文名: 按钮,纽扣
  • 外文名:button 
  • 音标:['bʌt(ə)n]
  • 作用:对话框中的图形元素,激活按钮

英文单词

button n. 按钮,纽扣
1、对话框中的一种图形元素。当激活它时,能执行指定的功能。用户可以採用以下方法来激活按钮:用滑鼠在其上单击,或者当按钮获得聚焦时按下“Return”或“Enter”键。
【英】A graphic element in a dialog box that, when activated,performs a specified function. The user activates a button by clicking on it with a mouse or, if the button has thefocus, by pressing the Return or Enter key。
2、滑鼠上的一个活动片,用于激活一些功能。旧式的滑鼠模型只有一个按钮;新式一般有两个或更多个按钮
【英】On a mouse, amovable piece that is pressed to activate some function. Older mouse models have only one button; newer modelstypically have two or more.

html标籤

HTML <button> 标籤
定义和用法
<button> 标籤定义一个按钮。
在 button 元素内部,您可以放置内容,比如文本或图像。这是该元素与使用 input 元素创建的按钮之间的不同之处。
<button> 控制项 与 <input type="button"> 相比,提供了更为强大的功能和更丰富的内容。<button> 与 </button> 标籤之间的所有内容都是按钮的内容,其中包括任何可接受的正文内容,比如文本或多媒体内容。
例如,我们可以在按钮中包括一个图像和相关的文本,用它们在按钮中创建一个吸引人的标记图像。
禁止使用的元素是图像映射,因为它对滑鼠和键盘敏感的动作会干扰表单按钮的行为。
请始终为按钮规定 type 属性。Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。

全局属性

<button> 标籤支持HTML 的全局属性。

事件属性

<button> 标籤支持HTML 的事件属性。

实例


<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>
声明:此文信息来源于网络,登载此文只为提供信息参考,并不用于任何商业目的。如有侵权,请及时联系我们:baisebaisebaise@yeah.net