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

未捕获的 ReferenceError:检查未在 onchange 处定义

未捕获的 ReferenceError:检查未在 onchange 处定义

汪汪一只猫 2023-09-04 15:51:47
我试图在选择特定选择选项时显示“expandrepeat”div。这是我不工作的代码:<script>window.check=function(elem) {    if (elem.selectedIndex == 1) {        document.getElementById("expandrepeat").style.display = 'block';    } else {        document.getElementById("expandrepeat").style.display = 'none';    }};</script>html:<div class="information-lane"><p class="information-title">{{trans.modal.repeat}}</p><select class="information-input form-control" onChange="check(this);">    <option value="-">No repeat</option>    <option value="-">Daily</option>    <option value="-">Weekly</option>    <option value="-">Monthly</option>    <option value="-">Yearly</option>    <option disabled="disabled">–––––––––––––––––––––––––––––––––––––––––––––</option>    <option value="-">Custom...</option></select></div><div id="expandrepeat" style="display:none;">  <p>Repeat every</p>  <input></div>
查看完整描述

目前暂无任何回答

  • 0 回答
  • 0 关注
  • 80 浏览

添加回答

举报

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