为了账号安全,请及时绑定邮箱和手机立即绑定

动态更改引导组件的值

动态更改引导组件的值

C#
噜噜哒 2021-06-02 10:02:06
我正在尝试更改将在按钮单击事件上更改的引导程序组件中的值这是我的组件。它是一个小条,根据通过标记代码输入的值填充到特定百分比<div class="progress"> <div id="theprogressbar" class ="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="95" aria-valuemin="0" aria-valuemax="100" style="width: 95%">  <span class="sr-only">95% Complete</span>    </div> </div>style="width: 95%"需要更改以更改条形填充的百分比。这是引导程序组件外观的示例我将如何更改按钮单击事件中的百分比值?提前致谢,如果我看起来含糊,对不起!c# 是我使用的编码语言,这是在 Web 表单上进行的更新:JQUERY 代码<script>$('#btnSave').click(function () {    $.ajax({    url: 'http://localhost:61417/ProjectMainMenu/GetProgress',    method: 'POST',    contentType: 'application/json',    success: function(response){        var progressValue=response.d;        $('#theprogressbar').attr('aria-valuenow', progressValue).css('width',progressValue);        $("#progressValue").text(progressValue);    }        });     </script>代码      [WebMethod]public static double GetProgress(){     double progress=0;     //Your Business Logic     progress=56;     return progress;}按钮标记代码<asp:Button ID="btnSave" width =" 250px" runat="server" Text="View"  class="btn btn-info" />
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 114 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信