当前位置: 移动技术网 > IT编程>开发语言>JavaScript > 实现两个文本框同时输入的实例

实现两个文本框同时输入的实例

2017年12月12日  | 移动技术网IT编程  | 我要评论

实例如下所示:

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-cn">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title></title>
</head>
<body>
<script language="javascript">
function copyob1toob2(){
  document.all["ob_text_2"].value=document.all["ob_text_1"].value
}
</script>
<input type="text" id="ob_text_1" size=20 onkeyup="copyob1toob2()">
<input type="text" id="ob_text_2" size=20>

</body>
</html>

以上这篇实现两个文本框同时输入的实例就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持移动技术网。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网