admin管理员组文章数量:1426117
<select id='orginCountryID' onChange='FillSubDropdownlist(this.value)'>
<option>-- select country --</option>
<option>Malaysia</option>
<option>Philippines</option>
</select>
<select id='orginCityID'>
<option>-- select city/town --</option>
<option>Kuala Lumpur</option>
<option>Manila</option>
</select>
<a href="#" onclick="window.history.back();return false;" class="btngrey"><span>back</span></>
It is not working IE11, the city option is missing. When I select a county the city automatically loads. When I click the back button the country option shows up fine, but the city option is missing only in IE, other browsers are working fine.
<select id='orginCountryID' onChange='FillSubDropdownlist(this.value)'>
<option>-- select country --</option>
<option>Malaysia</option>
<option>Philippines</option>
</select>
<select id='orginCityID'>
<option>-- select city/town --</option>
<option>Kuala Lumpur</option>
<option>Manila</option>
</select>
<a href="#" onclick="window.history.back();return false;" class="btngrey"><span>back</span></>
It is not working IE11, the city option is missing. When I select a county the city automatically loads. When I click the back button the country option shows up fine, but the city option is missing only in IE, other browsers are working fine.
Share Improve this question edited Aug 18, 2014 at 7:42 Ravinder Reddy asked Aug 18, 2014 at 4:03 Ravinder ReddyRavinder Reddy 211 silver badge3 bronze badges 7-
1
Where is that
FillSubDropdownlist()
function you are referring to defined? If the code is set up properly, that part should make the city dropdown box display once you have selected a valid country fom the country dropdown box. – IQAndreas Commented Aug 18, 2014 at 4:08 -
Also, I think some of the code was cut off (only the first part of the
<a href
was in your code) – IQAndreas Commented Aug 18, 2014 at 4:08 -
3
don't use a
<a>
if you're not going to link to another resource.href="#"
actually means something in HTML5, namely "navigate to the top of this document" so if you need what is effectively a button, not a link to the top of the document, use a<button>
element and then add CSS to make it look exactly how you need it to look (the only reason it looks like a button is browser default styling, all of which is overrulable) – Mike 'Pomax' Kamermans Commented Aug 18, 2014 at 4:13 - Did you try window.history.go(-1) instead of back(). I think I had similar problem before. – Shinigamae Commented Aug 18, 2014 at 7:47
- yes if i change like this window.history.go(-1) ....its working in IE but fails in chrome – Ravinder Reddy Commented Aug 18, 2014 at 7:48
1 Answer
Reset to default 3Try
<a href="#" onclick="window.history.go(-1); return false;" class="btngrey"><span>back</span></a>
Or
<a href="#" onclick="history.go(-1); return false;" class="btngrey"><span>back</span></a>
Hope this works.And remember to close your tag properly
本文标签: javascriptwindowhistoryback()return falsequot not working in IE11Stack Overflow
版权声明:本文标题:javascript - window.history.back();return false;" not working in IE11 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745450084a2658843.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论