我有一个简单的网页应用程序,它对IOS9表现得很奇怪。该应用程序使用UIWebview来访问我的网站。我有一系列具有选择框的网页,当做出选择时,会触发一些小的javascript并转到下一页。我更新到ios9的Iphone用户无法再从选择轮中选择任何内容。我很想知道是否有一些东西我可以在html或Javascript中更改,以防止我不得不进行整个应用程序更新。我的网页在下面。
<?
include("conn.php");
include("pl_header.php");
//// Get Block Areas
$sql="SELECT DISTINCT area FROM platform_locations";
$result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result)) {
$area=$row["area"];
$options.="<OPTION VALUE=\"search_step_2.php?area=$area\">".$area.'</option>';
}
?>
<h3>Step 1<br><br>Choose an Area</h3><br><br>
<form name=form1>
<select name="URL" onchange="$('#myLoadingPicture').show(); window.location.href=this.form.URL.options[this.form.URL.selectedIndex].value" onfocus="javascript:toggle();" class="select">
<option value="" disabled="disabled" selected="selected">Click Here To Select</option>
<?=$options?>
</SELECT>
<br><br><br><br>
<center>
<a href="map_search1.php" class="small_button">More Search Options</a></center><br>
</form>
</div>
</body>
</html>
答案 0 :(得分:3)
该错误仅存在于使用IOS 9.x的iphone上的UIwebview中。在safari和ipad上都可以。它不是jquery或事件处理程序问题
这是一个原生的选择html标签问题
我们试图找到一个解决方案,而无需重新编译/提交我们的应用程序到商店...
我们在使用以下非常基本的样本时遇到了错误。
<html>
<head>
<title>test ios9 bug</title>
</head>
<body>
<div>
<select>
<option>opt1</option>
<option>opt2</option>
<option selected="selected">opt3</option>
<option>opt4</option>
<option>opt5</option>
</select>
</div>
</body>
</html>
&#13;
答案 1 :(得分:2)
I've spend some time at testing your code. Your page works properly on the iOS 9 devices. Furthermore there were no changes in UIWebView class that could cause this bug.
Looking at your question I'm not able to determine where is the bug.
Debugging tip:
Open the page you are viewing inside the UIWebView in the Safari on any iOS 9 device. UIWebView is based on the WebKit library that is also used in Safari so you will able to detect if the bug is in your iOS application or in a webpage.
答案 2 :(得分:0)
iOS 9中存在许多问题(如果你问我它已经坏了)。根据{{3}} jQuery线程,您可以尝试以下方法:
<script type="text/javascript" charset="utf-8" src="js/jquery.js">
<script type="text/javascript">
$(document).bind("mobileinit", function(){
$.mobile.hashListeningEnabled = false;
});
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.mobile-1.4.5.js">