<a>target属性 跳转问题?
html吧
全部回复
仅看楼主
level 1
lcde01 楼主
<iframe src="" name="i" ></iframe>
<a href="" target="i"><input type="button" value="刷新"></a>
<input type="text" value="网址">
想实现 可以修改的href链接
该怎么实现
2022年09月02日 09点09分 1
level 8
需要用JS
_____
<iframe id="myFrame" src="某处"></iframe>
<input type="text" id="myFrameLocation" value="网址">
<input type="button" onclick="changeSrc()" value="更新">
<script>function changeSrc(){document.getElementById("myframe").src=document.getElementById("myFrameLocation").value;}</script>
_____
按下按钮后,iframe的src属性会变成文本框里的网址,从而更新iframe的内容
2022年09月03日 06点09分 5
十分感谢!
2022年09月03日 12点09分
1