html - 为什么 "true" bool 值是 "wrong attribute value"?

标签 html

我有以下按钮:

<button id="=" style=width:150px;height:150px;font-size:100px; onclick="equalFunction()" disabled="true">=</button>

但是在 disabled="true" 中,我的 IDE 将 "true" 值识别为“错误的属性值”,有人知道如何解决这个问题吗?代码仍然有效,只是看到它被突出显示很烦人。

最佳答案

您不需要将其设置为 true。做这样的事情:

<button id="=" style=width:150px;height:150px;font-size:100px; onclick="equalFunction()" disabled>=</button>

关于html - 为什么 "true" bool 值是 "wrong attribute value"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51679474/

相关文章:

html - 我可以在标题内容和链接标签中使用代码块来引用主题吗?

javascript - 如何在 html 侧边栏中包含选中所有框

header 中的 HTML 横幅不显示

html - 将 silverlight 应用程序转换为 html 的最佳策略是什么?

php - 更新管理页面上的行

php - 从 MySQL 到 <输入类型 ="datetime-local">

javascript - HTML5 Canvas + JavaScript 线框球体转换问题

javascript - HTML,如何使用 jQuery 按列将数据添加到表中?

c# - 如何在 javascript 和 asp.net 中获取客户端 ID 值?

javascript - 我可以使用 <li> 标签的任何属性来存储项目的服务器端 ID 吗?