No-Library (pure JS), HTML, CSS, JavaScript
No-Library (pure JS), HTML, CSS, Vue
<select id="selectbox" @change="switchView($event, $event.target.selectedIndex)"> <option v-for="(item, index) in items" v-bind:value="item.title"> {{ item.title }} </option> switchView: function(event, selectedIndex) { console.log(event, selectedIndex); this.selectedIndex = selectedIndex; }
No-Library (pure JS), HTML, CSS, React