iframe不工作android内置浏览器怎么解决问题?

时间:2012-02-08 04:40:18

标签: android html cordova browser

我正在使用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 inbuild浏览器如何解决问题?请告诉所有浏览器支持的任何其他标签。 enter image description here enter image description here

2 个答案:

答案 0 :(得分:1)

Android浏览器支持iframe。我怀疑它是可能导致问题的其他属性之一。我知道滚动属性可能导致iframe不显示。尝试使用hrefwidth以及height更简单的iframe版本,看看它是否显示。

Select One

Select Two

答案 1 :(得分:-1)

从它的外观来看,i-frame正在工作,它很可能是选择脚本,尝试使用单选按钮看看是否有效。

出于某种原因,使用选择表单的几种类型的浏览器都很挑剔。