JSFiddle - React, Tailwind, and code Playground

by Dragan Gaić

HTML

<section data-role="page">
<section data-role="content">
    <input type="button" value="what is the value" id="myButton"/>
    <select class="mySelect">
        <option value="1">one</option>
        <option value="2">two</option>
        <option value="3">three</option>
    </select>
 </section>
</section>

JavaScript

$("#myButton").click(function(){
    var val = $(".mySelect").find(":selected").text();
    alert(val);
});