gpt4 book ai didi

javascript - asp :RadioButton - Radio button click working fine in IE, 但在其他浏览器中不存在

转载 作者:行者123 更新时间:2023-11-28 08:40:28 24 4
gpt4 key购买 nike

ASP.Net

<asp:RadioButton ID="rdbABC" GroupName="samp" Text="ABC" CssClass="fl_left"
onclick="clickStreamForLCW('rdbABC-Linetype', 'radio', this);return LaunchApplyChangesLTC(this);"
Checked="true" runat="server" AutoPostBack="true" OnCheckedChanged="rdbLineType_CheckedChanged" />
<asp:RadioButton ID="rdbXYZ" CssClass="fl_left" GroupName="samp" Text="XYZ"
onclick="clickStreamForLCW('rdbXYZ-Linetype', 'radio', this);return LaunchApplyChangesLTC(this);"
Checked="true" runat="server" AutoPostBack="true" OnCheckedChanged="rdbLineType_CheckedChanged" />

JavaScript

function LaunchApplyChangesLTC(sender) {
if ($("#dVApplyChangesPopUpforLineType") != null) {
try {
if (document.getElementById("hdnSelectedLTCount") != null) {
var hdnLineCount = document.getElementById("hdnSelectedLTCount");
if (hdnLineCount != null) {
if (hdnLineCount.value > "4") {
$("#dVApplyChangesPopUpforLineType").jqm({ modal: true });
$("#dVApplyChangesPopUpforLineType").jqmShow();
$('html').css('overflow', 'hidden');
return false;
}
}
}
}
catch (e) { }

}
__doPostBack(sender.id, "");
}

我有 2 个单选按钮,默认选择 ABC。当我选择 XYZ 时,应显示一个弹出窗口。

这在 IE 中工作正常,但在其他浏览器中则不然。在其他浏览器中,如果我选择 XYZ,则会显示弹出窗口,但未选择 XYZ 单选按钮。

最佳答案

在显示弹出窗口后,您正在执行return false,这会阻止默认操作。删除它,选择就会通过。

如果您这样做是为了防止回发 - 只需为该按钮设置 AutoPostBack="false" ,如果需要 - 通过 __doPostBack 回发 - 看起来您是现在已经在其他地方这样做了

关于javascript - asp :RadioButton - Radio button click working fine in IE, 但在其他浏览器中不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20549309/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com