7gugu’s blog

日本分站

Entries from 2018-08-13 to 1 day

谷歌浏览器不兼容select的option里onclick事件的解决方案

代码里在option 里加了onclick事件属性,平时多在firefox浏览器下开发,测试时发现以谷歌为内核的浏览器onclick事件无作用,查了下资料,在select里面用onchange就好了,如下: <select onchange="update_show(this.options[this.selectedIndex].value)"></select>

谷歌浏览器不兼容select的option里onclick事件的解决方案

代码里在option 里加了onclick事件属性,平时多在firefox浏览器下开发,测试时发现以谷歌为内核的浏览器onclick事件无作用,查了下资料,在select里面用onchange就好了,如下: [xml]<select onchange="update_show(this.options[this.selectedIndex].value)"></select>[/xml]