<%@ 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("select");
a.options[0]=new Option("one","");
a.options[1]=new Option("two","");
a.size="2";
var Object=div3.appendChild(a);
}
</script>
<body>
<input type="button" value="创建input" onclick="createForm()" />
<br>
下面就是要创建的输入框
<br>
<div id="div1">
</div>
<br>
333
</body>
</html>