如何在响应重定向后禁用按钮 [英] How to disable button after response redirect

查看:98
本文介绍了如何在响应重定向后禁用按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。我正在使用响应重定向进行刷新页面。该按钮具有响应重定向代码。我希望在转发后停用我的按钮。响应重定向到页面,因为我从来没有做过开关不是被动的。



我尝试了什么:



我试过response.write和jquery



Hello there. I am doing refresh page with response redirect. The button has a response redirect code. I want to deactivate my button after forwarding. Response redirect to the page because I've never done the switch is not passive.

What I have tried:

I tried response.write and jquery

Response.Redirect("~/flows/Edit?id=" + flowId);



JQuery;


JQuery;

$(function () {
  $("#sms").click(function () {
    var $foo = $(this);
    if(!$foo.data('clicked'))
    {
      alert("SMS sent successfully!");
    }
    else {
      alert("You've already sent this sms.");
    }
    $foo.data('clicked', true);
  });



a href;


a href;

<a class="btn btn-default" id="sms">Sent SMS</a>

推荐答案

function (){


#sms) .click( function (){
var
("#sms").click(function () { var


foo =


这篇关于如何在响应重定向后禁用按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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