call javascript function onchange event of dropdown list

后端 未结 5 627
隐瞒了意图╮
隐瞒了意图╮ 2021-02-01 19:38

I want to invoke javascript function when value in the dropdown list changes. I dont want to hardcode dropdown list id .

Hence not using document.getElem

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-01 20:11

    Your code is working just fine, you have to declare javscript method before DOM ready.

    your working example

提交回复
热议问题