html中input中image,input type=image, HTML元素

本文介绍了HTML中的图像输入元素`<input type=image>`,当用户点击该图像时,它会触发表单的立即提交。提交的x和y坐标会附加到控件名称后,而value属性则被忽略。支持多种图像和视频格式,适用于Internet Explorer 5及更高版本。示例代码展示了如何创建这样一个图像提交按钮。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

定义

创建一个图像控件,该控件被点击后将导致表单立即被提交。

Creates an image control that, when clicked, causes the form to be immediately submitted.

注释

x 坐标将以控件名称后加 .x 提交,y 坐标将以控件名称后加 .y 提交。任何 value 属性都将被忽略。src 属性指定了 IMG 元素。

从 Internet Explorer 5 起支持下列图像和视频文件格式。

.avi

.bmp

.emf

.gif

.jpg, .jpeg

.mov

.mpg, .mpeg

.png

.wmf

.xbm

此元素在 Internet Explorer 3.0 及以上版本的 HTML 和脚本中可用。

此元素是一个内嵌元素。

此元素不需要关闭标签。

The x-coordinate is submitted under the name of the control with .x appended, and the y-coordinate is submitted under the name of the control with .y appended. Any value property is ignored. The src property specifies the IMG element.

The following image and video file formats are supported as of Internet Explorer 5.

.avi—Audio-Visual Interleaved (AVI)

.bmp—Windows Bitmap (BMP)

.emf—Windows Enhanced Metafile (EMF)

.gif—Graphics Interchange Format (GIF)

.jpg, .jpeg—Joint Photographic Experts Group (JPEG)

.mov—Apple QuickTime Movie (MOV)

.mpg, .mpeg—Motion Picture Experts Group (MPEG)

.png—Portable Network Graphics (PNG)

.wmf—Windows Metafile (WMF)

.xbm—X Bitmap (XBM)

The INPUT type=image element is available in HTML and script as of Internet Explorer 3.0.

This element is an inline element.

This element does not require a closing tag.

示例代码

请输入你的姓名:

alt = "提交" NAME="imagesubmit">

演示示例

另见

相关教程和示例代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值