<html>
<head>
<title>複製欄位內容</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5" />
<script Language="javascript">
function OmitText()
{
var content=document.getElementById('add1').value;
document.getElementById("add2").value=content;
}
</script>
</head>
<body>
居住地址:<input type="text" id="add1" name="add1" value="台中市西區成功里成功路168號"><br>
<input type=button value=同居住地址 onclick="OmitText()">
戶籍地址:<input type="text" id="add2" name="add2" value="">
</body>
</html>

arrow
arrow
    文章標籤
    javascript copy form text
    全站熱搜

    痞客興 發表在 痞客邦 留言(0) 人氣()