本文介绍了提交后重新启用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在采用与

当前的工作方式是生成一个文件并将其返回给客户端,但是在返回文件后,该按钮应再次变为活动状态.因此响应中包含该文件.但是该按钮不会重新激活.

How this currently works is that a file is generated and returned to the client, however after the file is returned the button should become active again.so the response contains the file. But the button does not reactivate.

我不确定是否可以做到.有什么想法吗?谢谢

I'm not certain if this can be done.Any thoughts?Thanks

推荐答案

您可以将按钮的ID模式设置为静态.然后为按钮选择一个唯一的ID.只要您验证文件已成功传输,就可以调用(jquery):

You could set the Id mode of the button to static. Then choose a unique Id for the button. Whenever you have verified that the file is successfully transmitted you can call (jquery):

$("#idOfSubmitButton").attr("disabled", false);

这篇关于提交后重新启用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 23:08
查看更多