jquery - how to get number from a string with mixture of letters and number

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2014-06-13T03:06:25Z Indexed on 2014/06/13 3:25 UTC
Read the original article Hit count: 105

Filed under:
|

How do I use JQuery to get number from the drop down select?

<select aria-invalid="false" id="RatePercent" class="wpcf7-form-control wpcf7-select ratePercent" name="RatePercent">
    <option value="">---</option>
    <option value="Floating-6.5%">Floating-6.5%</option>
    <option value="6 Months-5.65%">6 Months-5.65%</option>
    <option value="1 Year-5.85%">1 Year-5.85%</option>
    <option value="18 Months-5.99%">18 Months-5.99%</option>
    <option value="2 Years-6.19%">2 Years-6.19%</option>
    <option value="3 Years-6.85%">3 Years-6.85%</option>
    <option value="4 Years-7.19%">4 Years-7.19%</option>
    <option value="5 Years-7.40%">5 Years-7.40%</option>
</select>

If you choose 1 Year-5.85%, it returns '5.85', instead of '1 Year-5.85%'?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html