The codes work in Chrome and Firefox but not in IE. Not sure why. Please advise! Thanks
Background : select the targeted locale and download the exe file when user click on the "click here to download" button.
<html>
<body>
<p>Select language:<br />
<select class="simpleFormSelect" id="h" name="list" xmlns="http://www.w3.org/1999/xhtml">
<option value="exe download url here">English</option>
<option value="exe download url here">Arabic</option>
<option value="exe download url here">Chinese (Hong Kong)</option>
<option value="exe download url here">Chinese (Simplified)</option>
</select>
<input onclick="top.location.href = $('#h').prop('options')[$('#h').prop('selectedIndex')].value;" type="button" value="Click here to Download" />
(Download size: 6 MB)
</p>
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
</body>
</html>
Try to use window.top.location = "NEW_URL"
for the IE. Or, if your code is run from iframe, parent.location = "NEW_URL"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.