jquery: switch chosen selectbox selected value on click -


I want to exchange values ​​for jquery from one selectbox to another,

In the selectbox

Example:

It says that I have 2 dropdown selection boxes, I first used the USD & amp; On the second I have selected the URO, both the selected values ​​are clicked on the switch button & amp;

I tried the code below, but now it is giving me what I see, it can be that you can help me

(click " "," # Sweetid ", function () {var frm = ''; var to = ''; frm = $ (" # from_currency option: val (); to = $ ("# to_currency option: selected"). Val (); $ ("# to_currency") Val (frm); $ ("# from_currency"). Val (from); // currency converter ();});

HTML code

  & lt; select name = "from_currency" id = "from_currency"> 
option value = "USD"> USD : United States dollar & lt; / wil P & gt; Option value = "EUR"> EUR: Euro

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -