Javascript 提交到其他提交页面,该页面也提交并加载
是否可以使用javascript从page1提交到另一个page2,该page2提交到中的iframe,然后用提交的结果加载page2 第1页搜索表单:Javascript 提交到其他提交页面,该页面也提交并加载,javascript,html,forms,iframe,form-submit,Javascript,Html,Forms,Iframe,Form Submit,是否可以使用javascript从page1提交到另一个page2,该page2提交到中的iframe,然后用提交的结果加载page2 第1页搜索表单: <form id="SearchForm" action="http://mysite.com/search-results-jobs/" target="" method="post"> <input type="hidden" name="action" value="search" /> <i
<form id="SearchForm" action="http://mysite.com/search-results-jobs/" target="" method="post">
<input type="hidden" name="action" value="search" />
<input type="hidden" name="listing_type[equal]" value="Job" />
<label>
<strong>What?</strong>
<em><input type="text" value="job title, keywords or company name" onblur="if(this.value=='') this.value='job title, keywords or company name'" onFocus="if(this.value =='job title, keywords or company name' ) this.value=''" name="keywords [all_words]" /></em>
</label>
<label>
<strong class="color">Where?</strong>
<b><input type="text" value="city, state or zip code" onblur="if(this.value=='') this.value='city, state or zip code'" onFocus="if(this.value =='city, state or zip code' ) this.value=''" name="City[all_words]" /></b>
</label>
<a href="#" class="SearchForm-link" onclick="document.getElementById('SearchForm').submit()"/>Search</a>
</form>
第2页
<form id="SearchForm" action="http://mysite.com/search-results-jobs/" target="my-iframe" method="post">
<input type="hidden" name="action" value="search" />
<input type="hidden" name="listing_type[equal]" value="Job" />
<label>
<strong>What?</strong>
<em><input type="text" value="job title, keywords or company name" onblur="if(this.value=='') this.value='job title, keywords or company name'" onFocus="if(this.value =='job title, keywords or company name' ) this.value=''" name="keywords[all_words]" /></em></label>
<label>
<strong class="color">Where?</strong>
<b><input type="text" value="city, state or zip code" onblur="if(this.value=='') this.value='city, state or zip code'" onFocus="if(this.value =='city, state or zip code' ) this.value=''" name="City[all_words]" /></b>
</label>
<a href="#" class="SearchForm-link" onclick="one(); two(); three(); four();">Search</a>
<input type="submit" id="btn-search" class="button" value="Cauta"/>
</form>
<iframe id="my-iframe" name="my-iframe" align="right" src="http://mysite.com" frameborder="0" height="100%" scrolling="no" width="100%"></iframe>
你能再具体一点吗?也许给我们看一些模拟代码?这里是测试页面1和页面2,我只需要在页面1上搜索,然后在iframe中加载带有结果的页面2。现在,如果您在第1页上搜索,它将单独加载iframe结果页,而我需要加载带有iframe结果的第2页。我以前从未使用过iframe,但在第2页中使用正确的window.onload函数似乎应该很容易。照你说的做。将page1加载到page2,然后在page2中加载加载iframe的window.onload。困难是什么?