mardi 23 août 2016

Jquery - Duplicate span price value to form input without euro sign or comma

I have a price span and need to duplicate its numerical value into a form input without the euro sign or comma.

The code is

<span class="main-price">€25,960</span>
<input id="fieldname2_1" class="field number small valid" type="number" value="20000" max="100000" min="0" name="fieldname2_1">

And I need the number only so clone over 25960.

How would I do this in jquery?

Aucun commentaire:

Enregistrer un commentaire