一款比较简单的js点击文本框内容互换代码,点击中间的切换按钮,城市内容对调互换,除了地点互换,当然还可以用作其它方面。
js代码
<script type=\"text/javascript\"> function change(){ var num1 = document.getElementById(\"num1\").value; var num2 = document.getElementById(\"num2\").value; { document.getElementById(\"num2\").value = num1; document.getElementById(\"num1\").value = num2; } } </script>
暂无评论内容