这可能吗?
所以我在第一页上有以下代码:
<form method="get" action="http://webpage.com">
<input type="hidden" name="a" value="1">
<input type="hidden" name="b" value="2">
<input type="hidden" name="c" value="3">
<input type="submit" class="submit" value="submit">
</form>
第二页中的表单字段预先填充为 1、2、3。如果页面位于不同的域中,我是否可以使用第一页中的代码在加载时自动提交第二个表单,或者自动提交必须从第二页完成吗?
我不知道该怎么做,但我想我还是会问。
最佳答案
Would it be possible for me to auto-submit this second form on load using code from the first page
没有。您在页面上执行的任何操作都不会影响下一页的行为(除了将数据传递给后续页面中的逻辑触发的数据之外)。
关于javascript - 传递查询字符串后自动在不同页面提交表单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34844297/