iframe 不工作 android 内置浏览器如何解决问题?
我正在使用phonegap(html,javascript)开发跨平台移动应用程序,问题是所选项目相关图像未显示在iframe中,并且该图像显示另一个页面,请参阅下面的代码
<html>
<head>
<script>
function onchangeevent(mySelect)
{
PageIndex2=mySelect.selectedIndex;
{
if
(
mySelect.options[PageIndex2].value != "none"
)
{
frames['iframe2'].location.href = mySelect.options[PageIndex2].value;
}
}
}
</script>
</head>
<body>
<form name="form">
<p><select NAME="selectimage" SIZE="1" onChange="onchangeevent(this.form.selectimage)">
<option VALUE="none" SELECTED>Select a page and go</option>
<option VALUE="ic_launcher.png">one</option>
<option VALUE="icon.png">two</option>
</select> </p>
<p>
<iframe src="" name="iframe2" height="100%" width="100%">You need a Frames Capable browser to view this content.</iframe>
</p>
</form>
</body>
</html>
iframe标签不工作android内置浏览器如何解决该问题?请告诉所有浏览器支持的任何替代标签。
I am working on a cross platform mobile application using phonegap (html,javascript) problem is selected item related image not display in iframe and this image display another page please see below code
<html>
<head>
<script>
function onchangeevent(mySelect)
{
PageIndex2=mySelect.selectedIndex;
{
if
(
mySelect.options[PageIndex2].value != "none"
)
{
frames['iframe2'].location.href = mySelect.options[PageIndex2].value;
}
}
}
</script>
</head>
<body>
<form name="form">
<p><select NAME="selectimage" SIZE="1" onChange="onchangeevent(this.form.selectimage)">
<option VALUE="none" SELECTED>Select a page and go</option>
<option VALUE="ic_launcher.png">one</option>
<option VALUE="icon.png">two</option>
</select> </p>
<p>
<iframe src="" name="iframe2" height="100%" width="100%">You need a Frames Capable browser to view this content.</iframe>
</p>
</form>
</body>
</html>
iframe tag not working android inbuild browser how can resolve the issue ? please tell any alternative tags supported all browsers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Android 浏览器支持
iframe
。我怀疑这是可能导致问题的其他属性之一。我知道滚动属性可能会导致iframe
不出现。尝试使用仅包含href
以及width
和height
的 iframe 的简单版本,看看它是否出现。Android browser supports
iframe
. I suspect it's one of the other attributes that may be causing an issue. I know scroll attribute can cause theiframe
to not appear. Try a simpler version of the iframe with just thehref
and awidth
andheight
and see if it appears.从它的外观来看,i 框架正在工作,它很可能是选择脚本,尝试使用单选按钮看看是否有效。
由于某种原因,几种类型的浏览器对选择表单很挑剔。
From the looks of it, the i-frame is working, it's most likely the select script, try using radio buttons see if that works.
For some reason several types of browsers are picky with the select form.