JSFiddle - React, Tailwind, and code Playground

by godhong

HTML

<div>
    <div style="float:left">Display interval:</div>
    <div style="float:left">
        <select id="display_interval_1">
            <option value="&quot;1 month&quot;">1 month</option>
            <option value="&quot;3 month&quot;" selected>3 month</option>
            <option value="&quot;6 month&quot;">6 month</option>
            <option value="&quot;1 year&quot;">1 year</option>
        </select>
    </div>
</div>
<div>
    <button type="button" id="calc1">Generate</button>
</div>

JavaScript

$('#calc1').click(function () {
            var range_interval = $("#display_interval_1").val();
            console.log(range_interval)

        })