html5 – 错误:具有属性类型的元素输入,其值为按钮必须具有非空属性值

前端之家收集整理的这篇文章主要介绍了html5 – 错误:具有属性类型的元素输入,其值为按钮必须具有非空属性值前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用joomla 2.5.8与virtuemart 2.0.6.在w3验证后,我得到以下错误

Element input with attribute type whose value is button must have
non-empty attribute value <input type="button"class="quantity-controls quantity-minus" />. Element input with
attribute type whose value is button must have non-empty attribute
value.

解决方法

您可以尝试使用< button>标签.
<button type="button" id="myButton">Click</button>

它是HTML5的有效标记.如果您需要此按钮提交表单,您可以更改要提交的类型.

<button type="submit" id="myButton">Click</button>

猜你在找的HTML5相关文章