使用onClick禁用/启用按钮 [英] Disable/Enable button using onClick

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

问题描述

全部好,


我是javascript的新手。我有一个片段,其中我简要说明了我要做的事情。在下面有一个名称变量的东西。试图重置页面。下面附有部分重置的代码。


有一个重置按钮,它将重置连接,数据加载需要两分钟,在此期间必须禁用重置按钮两分钟之后,它应该为用户启用按钮。

HI All,

I am new to javascript. I have snippet wherein i am giving a brief note on what i am trying to do. In the below have a variable by name stuff. trying to reset the page. Part of the code which does reset is attached below.

there is a reset button which will reset the connection and it takes two min for data loading during which the reset button has to be disabled and later after two mins it should enable the button for the user.

展开 | 选择 | Wrap | 行号

推荐答案

true和false是布尔值,不应该是字符串。
true and false are booleans and should not be strings.


它应该是:
It should be:
展开 | 选择 | Wrap | 行号


是的你是对的我面临一个问题,当我disble按钮然后尝试提交返回值,重置不会发生。我也在使用超时功能。然而它没什么用处。


我的要求是禁用按钮两分钟,意味着重置应该发生。请尽我所能。
yes you are right i am facing a problem when i disble the button then try submitting the return value, the reset doesnt happens. I am also using the timeout function. However its not much useful.

My requirement is to disable the button for two mins, meanswhile the reset should happen. please sugest the way i can do this.


这篇关于使用onClick禁用/启用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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