插入代码即可实现。
鼠标上的一个活动片,用于激活一些功能。旧式的鼠标模型只有一个按钮;新式一般有两个或更多个按钮
【英】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 元素内部,您可以放置内容,比如文本或图像。这是该元素与使用 input 元素创建的按钮之间的不同之处。
例如,我们可以在按钮中包括一个图像和相关的文本,用它们在按钮中创建一个吸引人的标记图像。
唯一禁止使用的元素是图像映射,因为它对鼠标和键盘敏感的动作会干扰表单按钮的行为。
请始终为按钮规定 type 属性。Internet Explorer 的默认类型是 "button",而其他浏览器中(包括 W3C 规范)的默认值是 "submit"。
实例
function whichButton(event)
{
if (event.button==2)
{
alert"You clicked the right mouse button!")
}
else
{
alert"You clicked the left mouse button!")
}
}
Click in the document. An alert box will
alert which mouse button you clicked.
使用javascript控制