javascript - avalon.js ms-on event binding is invalid?
typecho
typecho 2017-07-05 10:42:46
0
1
838

select binding event

 var vm = avalon.define({ $id: "checkDeviceContext", deviceList: [], selectChange: function () { alert(1) } });

If you change change to click, there will be no problem. What is the reason?

typecho
typecho

Following the voice in heart.

reply all (1)
phpcn_u1582

Because the triggering conditions ofms-on-changeare similar to theonchangetriggering conditions ofselect, both are triggered when the value changes.

In your example, there is only oneoptionunderselect, so even if you click, it will not change the value ofselect, soms-on-changewill not be triggered.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!