我有一个问题如何调用onchanges敲js到我的选择选项,我已经有一个函数和HTML,但当我选择选择选项,没有任何变化
<select data-bind="event:{change:setSelectedStation() },
options: seedData,
optionsText: 'text',
optionsValue: 'value'">
</select>
Run Code Online (Sandbox Code Playgroud)
这是我的功能
setSelectedStation: function(element, KioskId){
this.getPopUp().closeModal();
$('.selected-station').html(element);
$('[name="popstation_detail"]').val(element);
$('[name="popstation_address"]').val(KioskId);
$('[name="popstation_text"]').val(element);
// console.log($('[name="popstation_text"]').val());
this.isSelectedStationVisible(true);
},
Run Code Online (Sandbox Code Playgroud)