gpt4 book ai didi

html - 带有前进/后退按钮、URL 加载器等的全功能 iFrame

转载 作者:行者123 更新时间:2023-11-27 22:43:49 25 4
gpt4 key购买 nike

<分区>

感谢您查看我的问题。所以,我对 iframe 有疑问。我想要一个几乎像实际浏览器的 iframe。我需要让它至少有一个前进按钮、一个后退按钮和一个 URL 加载器。我已经做到了这一点,但效果不佳。我的代码:

<html>
<head>
<title> iFrame </title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript">
$(function()
{
$('.frmSubmit').click(function(e)
{
$('#myIframe').attr('src', $('.frmUrlVal').attr('value'));
e.preventDefault();
});
});
</script>
</head>
<body>
<form>
<input type="text" value="http://"class="frmUrlVal">
<input type="submit" class="frmSubmit" value="Go">
<input type="button" VALUE="&lt; &lt; &nbsp; Back &nbsp;" onClick="myIframe.history.back()">
<input type="button" VALUE="Forward &nbsp; &gt; &gt;" onClick="myIframe.history.forward()">
</form>
<iframe align="center" width="50%" height="50%" src="http://gravitate.webs.com" frameborder=yes scrolling="yes" name="myIframe" id="myIframe"> </iframe>
<form>

重新加载/取消按钮也将是首选。甚至可能是状态栏。谢谢!!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com