+ 1
How to swap to text boxes value without taking any variable in java script
2 Answers
+ 5
Another way:
https://code.sololearn.com/WfoTsGVNRuyT/?ref=app
(a little more verbose, but avoiding intermediate array ;P)
0
If they both have an id set:
document.getElementById("id1").value = [document.getElementById("id2").value, document.getElementById("id2").value = document.getElementById("id1").value][0];
Otherwise modify it for how you are get the elements.