【发布时间】:2017-03-02 23:43:12
【问题描述】:
我有一个这样的 iframe:
<iframe name="report-iframe" id="report-iframe" src="https://reporting.com/embed" width="100%" height="300" frameborder="0"></iframe>
我想使用表单中的值替换 src 值
<form method="post" target="report-iframe">
<input id="form-type" name="form-type" type="text" />
<input id="form-date" name="form-date" type="date" />
<input type="button" value="Update Report" onclick="javascript_function()"/>
</form>
所以 iframe 的结果来源是:
src="https://reporting.com/embed?param_type=form-type¶m_date=form-date"
然后使用传递的参数重新加载 iframe。
如果可能的话,我想只使用 javascript/jquery 来做到这一点。
【问题讨论】:
-
我们不能为你做这件事,但这个问题有already a topic
标签: javascript jquery forms iframe