For-example I\'ve got a code:
8条回答 感动是毒 (楼主) 2021-01-06 00:06 this.selectedIndex returns an integer not a string. Something like 0,1,2 and probably 8 for 'others'. 8 == 'other' can never be true try this onchange="if (this.options[this.selectedIndex].value =='other')" 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
this.selectedIndex returns an integer not a string. Something like 0,1,2 and probably 8 for 'others'. 8 == 'other' can never be true
this.selectedIndex
8 == 'other'
try this
onchange="if (this.options[this.selectedIndex].value =='other')"