[英]how to swap one text field to another in html?
In above image enter from and to field then 在上面的图像然后输入和到字段
click the arrow it will change value in page from value is stored in to and to value is stored in from want code for swap that text box value in html 单击箭头它将更改页面中的值从值存储到和值存储在希望代码中用于交换html中的文本框值
hard to understand your question but maybe this one you want . 很难理解你的问题,但也许这个你想要的。
<input type="text" id="f1">
<input type="text" id="f2">
<input type="button" id="b1" value="interchange">
$(document).ready(function(){
$("#id1").click(function(){
var f1 = $("#f1").val();
$("#f2").val(f1);
})
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.