获取页面中指定名称的表单。
表单对象。
该方法返回的是 document.forms[name],但在返回前,表单对象已经被赋予新的方法。
<form method="post" name="login" action="http://localhost">
<input type="text" name="username" />
<input type="password" name="password" />
<input type="submit" />
<input type="button" value="用JavaScript提交表单" onclick="test()" />
</form>
<script type="text/javascript" >
function test(){
$.Form("login").submit(); //submit() 是表单对象内置的方法。
}
</script>