日期:2014-05-16 浏览次数:20469 次
<div id="dusername">
<input type="text" ... />
</div>
<html>
<head>
<title>aaaa</title>
</head>
<body>
<div id="dusername">
<input type="text" id="text" />
</div>
<script type="text/javascript">
window.onload = function(){
var newNode = document.createElement("div");
newNode.innerHTML =" This is a newcon ";
document.getElementById('dusername').insertBefore(newNode,document.getElementById('text'))
}
</script>
</body>
</html>