少年阿宾

那些青春的岁月

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks
<%@ 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 form1=document.createElement("form");
document.body.appendChild(form1);
form1.method="POST";
alert(form1)
return form1;
}
function createFormElement(from3,elementName,elementValue){
var element=document.createElement("input");
element.name=elementName;
element.value=elementValue;
from3.appendChild(element);
return element;
}
function createFormSubmit(){
var form5=createForm();
createFormElement(form5,"username","abin");
createFormElement(form5,"password","varyall");
form5.action="success.jsp";
form5.submit();
}
</script>
<body>
<input type="button" value="提交FORM" onclick="createFormSubmit()" />
<br>
下面就是要创建的输入框
<br>
<div id="div1">
</div>
<br>
333
</body>
</html>
posted on 2011-12-19 16:06 abin 阅读(357) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: