页面下拉框中通过jquery存放预选值,通过from表单提交。action接受打包的请求数据。在action中用getParameter(String name)能获得下拉框的请求数据;action中设立方法返回你对应的响应返回客服端。页面预设jquery接受从服务器端发送过来的数据,通过判断进行动态输出。
function Create()
{
var type=$("#span select option:selected").val();
if(type=="文本框")
{
$("").appendTo("form");
}
else if(type=="复选框")
{
$("").appendTo("form");
}
else if(type=="单选")
{
$("").appendTo("form");
}
}