gpt4 book ai didi

javascript - 选中复选框 "OTHERS"时显示文本框

转载 作者:行者123 更新时间:2023-12-02 22:51:34 24 4
gpt4 key购买 nike

我想在选中“其他”复选框时显示文本框。

我尝试过下面的脚本。但这不起作用。使用组合框时很好。

 $('input[name=ctrl_CheckedList_qflht]').on('click',(function () {

if ($(this).val() === "OTHERS") {

console.dir(element);

if (element.checked) {

$('input[name=" ctrl_Textbox_pwwxg"]').show();

}
else {

$('input[name=" ctrl_Textbox_pwwxg"]').hide();

}

}

} ) );

最佳答案

请删除您的空间“ctrl_Textbox_pwwxg”->“ctrl_Textbox_pwwxg”

试试这个:

$('input[name="ctrl_CheckedList_qflht"]').change(function() {
// this represents the checkbox that was checked
// do something with it
});

关于javascript - 选中复选框 "OTHERS"时显示文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58160813/

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