0
因此,我想知道如何将此示例中的目标“google-iframe”添加到iframe的源链接中。如何将目标添加到src引号末尾
下面是当前代码我有:
<!-- CSS -->
<style>
body {
color: purple;
background-color: #663300 }
</style>
<form target="google-iframe">
<input id="search" type="text"/>
<input type="image" onclick="google-iframe" src="Searchbutton.png" alt="Search Button" height="20" width="20">
<iframe id="google-iframe" src="http://www.google.com/custom?q=" width="250" height="600" onmouseover="width=400" onmouseout="width=250" onclick="window.location='http://www.google.com/custom?q=Test&btnG=Search'"></iframe>
</form>
我想拥有它是这样的:
<iframe id="google-iframe" src="http://www.google.com/custom?q=" + "google-iframe" width="250" height="600" onmouseover="width=400" onmouseout="width=250" onclick="window.location='http://www.google.com/custom?q=Test&btnG=Search'"></iframe>
的变化是它说
src=http://www.google.com/custome?q=
那什么被定义为“google-iframe”将被插入到src的末尾,例如
src=http://www.google.com/custome?q=WhatEverIsEntedInTheGoogle-Iframe
非常感谢!正是我在找什么,并节省了我吨的时间:) – Ibounes
虽然我怎么会一次搜索多个iframe?就像我想要搜索相同的东西,但可以在wiki和diction iframe上说,但所有关闭的同一个搜索栏。 – Ibounes
@Ibounes然后你将不得不使用JS提交到多个目标。 –