单击按钮时找不到的方法。

编程入门 行业动态 更新时间:2024-10-11 01:10:42
本文介绍了单击按钮时找不到的方法。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要使用show确认消息。我从''btnCalculate''clientclick事件中调用该方法。如果这是第一次,它会调用该方法。但如果我第二次单击该按钮,则找不到该方法。下面是我的代码。请指教。非常感谢你..

< asp:按钮ID =btnYesrunat =serverOnClick =btnYes_Clicked/> < asp:Button ID =btnCalculaterunat =serverText =Calculate ClaimOnClientClick =return(cfrm());/> 函数cfrm(){ var consultFee =''0''; consultFee = $(''[id $ = txtConsultFee]'')。val(); if(consultFee> 500){ if(confirm(''确认?'')){ $(''[id $ = btnYes]'') 。点击(); } } else { $(''[id $ = btnYes]'')。click(); } 返回false; }

解决方案

(''[id

= txtConsultFee]'' ).VAL(); if(consultFee> 500){ if(confirm(''确认?'')){

(''[id

I need to use show the confirm message. I am calling the method from ''btnCalculate'' clientclick event. It calls the method if it''s the first time. but if i click the button the second time, the method is not found. below is my code. Please advice. Thank you so much..

<asp:Button ID="btnYes" runat="server" OnClick="btnYes_Clicked" /> <asp:Button ID="btnCalculate" runat="server" Text="Calculate Claim" OnClientClick="return(cfrm());"/> function cfrm() { var consultFee = ''0''; consultFee = $(''[id$=txtConsultFee]'').val(); if (consultFee > 500) { if (confirm(''Confirm?'')) { $(''[id$=btnYes]'').click(); } } else { $(''[id$=btnYes]'').click(); } return false; }

解决方案

(''[id

=txtConsultFee]'').val(); if (consultFee > 500) { if (confirm(''Confirm?'')) {

(''[id

更多推荐

单击按钮时找不到的方法。

本文发布于:2023-11-09 03:53:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1571326.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   单击   按钮   方法

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!