【发布时间】:2011-12-21 15:09:22
【问题描述】:
jQuery 中有没有一种方法可以即时创建和提交表单?
如下所示:
<html>
<head>
<title>Title Text Goes Here</title>
<script src="http://code.jquery.com/jquery-1.7.js"></script>
<script>
$(document).ready(function(){alert('hi')});
$('<form/>').attr('action','form2.html').submit();
</script>
</head>
<body>
Content Area
</body>
</html>
这应该有效还是有其他方法可以做到这一点?
【问题讨论】:
-
你读过API吗?
-
还可以在这里查看接受的答案:stackoverflow.com/questions/14836557/…
标签: javascript jquery forms submit