<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>js run</title>
</head>
<script type="text/javascript">
function createForm(){
var div3=document.getElementById("div1");
var a=document.createElement("p");
a.innerHTML=" 段落内容";
div3.appendChild(a);
div3.insertBefore(a,"");
}
</script>
<body>
<input type="button" value="创建input" onclick="return createForm()" />
<br>
下面就是要创建的输入框
<br>
<div id="div1">
</div>
<br>
333
</body>
</html>