4
我有一个问题,如何调用onchanges敲JS给我选择的选项,我已经有一个功能和HTML,但是当我选择的选择选项,没有什么变化在选择更改事件与淘汰赛
<select data-bind="event:{change:setSelectedStation() },
options: seedData,
optionsText: 'text',
optionsValue: 'value'">
</select>
这里是我的功能
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);
},
我们不能只由一个函数调用? –
你*可以*,你不应该...如果你选择使用淘汰赛作为你的框架,最好是填充“淘汰赛的方式”。如果你想管理自己的事件处理和逐个更新UI元素,最好只使用jQuery并跳过敲除。 – user3297291
但如果我想在selectedItem中输入参数的值,我应该如何放入它? –