日期:2014-05-16 浏览次数:20353 次
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
window.onload = function() {
var arr = document.getElementsByName('textfield2');
for (var i = 0; i < arr.length; i++) {
var parString = arr[i].value;
arr[i].parentNode.innerHTML = parString;
}
}
</script>
</head>
<body>
<div id="d1">
<input name="textfield2" type="text" value="1.3" size="10" />
</div>
<div id="d2">
<input name="textfield2" type="text" value="2.3" size="10" />
</div>
</body>
</html>