dropDownMenuKategorie
全部标签 我对如何从HTML获取选定选项的索引有点困惑。项目。开启this页面中有两种方法介绍。但是,两者总是返回-1.这是我的jQuery代码:$(document).ready(function(){$("#dropDownMenuKategorie").change(function(){alert($("#dropDownMenuKategorieoption:selected").index());alert($("select[name='dropDownMenuKategorie']option:selected").index());});});在html中(...)Gastro
我对如何从HTML获取选定选项的索引有点困惑。项目。开启this页面中有两种方法介绍。但是,两者总是返回-1.这是我的jQuery代码:$(document).ready(function(){$("#dropDownMenuKategorie").change(function(){alert($("#dropDownMenuKategorieoption:selected").index());alert($("select[name='dropDownMenuKategorie']option:selected").index());});});在html中(...)Gastro