案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<body>
3
4
Field1: <input type="text" id="field1" value="Hello World!">
5
<br />
6
Field2: <input type="text" id="field2">
7
<br /><br />
8
Click the button below to copy the content of Field1 to Field2.
9
<br />
10
<button onclick="document.getElementById('field2').value=
11
document.getElementById('field1').value">Copy Text</button>
12
13
</body>
14
</html>
15