html部分
<form id="form1" action="${url}" target="target1" method="post">
<input type="hidden" name="appId" value="${appId}"/>
<input type="hidden" name="userId" value="${userId}"/>
<input type="hidden" name="interfacesURL" value="${interfacesURL}"/>
<input type="hidden" name="userName" value="${userName}"/>
<input type="hidden" name="userType" value="${userType}"/>
</form>
<iframe id="_iframe" name="target1" src="" style="width:100%;height:1267px;border:none;"></iframe>
js部分
$(function () {
$("#form1").submit();
})
本文介绍了一种使用HTML和JavaScript实现的自动表单提交方法,通过隐藏的iframe元素来触发页面跳转,适用于需要在后台进行无感操作的场景。
1446

被折叠的 条评论
为什么被折叠?



