可以将alt属性用于输入类型按钮 [英] can the alt attribute be used for an input type button

查看:108
本文介绍了可以将alt属性用于输入类型按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下输入标签中的alt属性。
正如我在许多网站上发现的那样,当我们有一个类型为image的输入时,就会使用alt属性。

1 /它可以用于输入类型按钮?

 < input type =buttonalt =myAction.myMethod/> 



<2> /它的含义是什么?

解决方案



  1. 它没有一个

唯一可以具有 alt 属性的输入是 type =image它提供了一个文本替代方法,用于无法呈现图像(例如,由于浏览器不支持图像或因为用户使用屏幕阅读器软件而无法加载(通常是为了补偿视觉) )相关的残疾)。

I wanna ask about the alt attribute in an input tag. As I found on many sites, the alt attribute is used when we have an input with type image.

1/ Can it be used for an input type button?

<input type="button" alt="myAction.myMethod" />

2/ what is its meaning?

解决方案

  1. No
  2. It doesn't have one

The only kind of input that can have an alt attribute is type="image" where it provides a text alternative for when the image can't be rendered (e.g. because it failed to load, because the browser doesn't support images, or because the user is employing screen reader software (usually to compensate for a vision related disability)).

这篇关于可以将alt属性用于输入类型按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆