为什么JS函数名与元素ID冲突?
is not a function
:
<script> function border(border) { alert(border); }</script><select id='border' name='border' onchange='border(this.value)'> <option value='foo'>foo</option> <option value='bar'>bar</option></select>
<script> function border(border) { alert(border); }</script><form><select id='border' name='border' onchange='border(this.value)'> <option value='foo'>foo</option> <option value='bar'>bar</option></select></form>
第一
第二
一只斗牛犬