问题:表单在chrome,firefox,safari和IE 9中运行正常。但是,在IE8中,表单不起作用。
不工作,我的意思是当您在下拉框中选择一个城市并选择回车时,该页面只会刷新。它适用于表单上的其他文本框/下拉框。
以下是该页面的路径:http://www.regalmed.com/index.cfm/urgent-care-finder/
我尝试将我所做的事情复制并粘贴到其他页面,然后通过手动执行我在表单上执行的操作来替换它,但它会继续刷新页面。
任何帮助都将不胜感激。
更新:以下是表单。我唯一能想到的是占位符在开头被阅读。这意味着,当表单加载时,它会考虑占位符"邮政编码"并在底部显示错误。不知道发生了什么
<!---<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="ie.min.css" />
<![endif]-->
</head>
<body>--->
<cfquery name="UCarecityFind" datasource="Data">
SELECT Distinct officecity FROM UrgHosp
where utilizedspecialty in (<cfqueryparam value="#name_list1#" list="true" cfsqltype="cf_sql_varchar">)
and network not like (<cfqueryparam value="#'%name_list2%'#" list="true" cfsqltype="cf_sql_varchar">)
and Company in (<cfqueryparam value="#name_list3#" list="true" cfsqltype="cf_sql_varchar">)
order by officecity
</cfquery>
<div class="panel panel-default">
<div class="panel-body">
<form name="UrgentCareSearch" ng-submit="SearchUrgentCare(searchParam);" novalidate="" role="form">
<div class="form-group">
<input class="form-control" id="urgentcare" ng-model="searchParam.UrgentCareName" placeholder="Urgent Care Name" type="text" />
</div>
<div class="form-group">
<SELECT name="proCity" class="form-control margin-bottom1" placeholder="City" ng-model="searchParam.City">
<option disabled="disabled" selected="selected" value="">City</option>
<option value=""></option>
<cfoutput query="UCarecityFind">
<option value=#officecity#>#officecity#</option>
</cfoutput>
</select>
</div>
<hr />
<div style="margin-top:-10px; margin-bottom:10px; text-align:center; font-size:8pt! important">* or Search by Zip code radius *</div>
<div class="row">
<div class="col-xs-7 no-right-padding">
<div class="form-group">
<div class="input-group"><select class="form-control" name="distance" ng-model="searchParam.Distance" ng-options="mile.value for mile in miles"><option selected="selected" value=" "></option><option >5</option><option>10</option><option>15</option><option>20</option></select>
<div class="input-group-addon">miles</div>
</div>
</div>
</div>
<div class="col-xs-5 no-left-padding widthZip">
<div class="form-group"><input allow-pattern="[\d\W]" class="form-control" id="zip" maxlength="5" ng-model="searchParam.Zip" placeholder="Zip code" type="text" /></div>
</div>
</div>
<div class="form-group"><input class="btn btn-warning btn-block" ng-click="gotoElement('SearchResultsAnchor');" type="submit" value="Search" /></div>
</form>
</div>
</div>
<script>
var probablyPhone = ((/iphone|android|ie|blackberry|fennec/).test(navigator.userAgent.toLowerCase()) && 'ontouchstart' in document.documentElement);
function initialize() {
(function($) {
$('.call').css("text-decoration", "none");
$('.call').css("color", "black");
$('.call').css("cursor", "default");
})(jQuery);
}
$(document).ready(function(){
$('#zip').on("change",function(){
$('#city option[value=""]').prop('selected',true).trigger('input');
/*console.log('input');*/
});
$('#city').on("change",function(){
$('#zip').val('').trigger('input');
/*console.log('change');*/
});
});
</script>
<!---
</body>
</html>
--->
答案 0 :(得分:2)
对于IE8,您需要一个垫片,请尝试查看是否有效..
https://github.com/fergaldoyle/angular.js-ie8-builds
看看这里:
https://github.com/NantHealth/AngularJS-IE8-Shim
hth,k