禁用和启用html输入按钮 [英] Disabling and enabling a html input button

查看:160
本文介绍了禁用和启用html输入按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个这样的按钮:

So I have a button like this:

<input id="Button" type="button" value="+" style="background-color:grey" onclick="Me();"/>

如何在需要时禁用和启用它?我已经尝试 disabled =禁用但启用它是一个问题。我尝试将其设置为false,但是没有启用它。

How can I disable and enable it when I want? I have tried disabled="disable" but enabling it back is a problem. I tried setting it back to false but that didn't enable it.

推荐答案

使用Javascript



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