2014-10-16 2 views
0

코드는 Chrome 및 Firefox에서는 작동하지만 IE에서는 작동하지 않습니다. 이유를 모르겠다. 제발 조언 해! 감사합니다코드는 Chrome 및 Firefox에서는 작동하지만 IE에서는 작동하지 않습니다.

배경 : 대상 로케일을 선택하고 "다운로드하려면 여기를 클릭하십시오"버튼을 클릭하면 exe 파일을 다운로드하십시오.

<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> 

답변

0

IE의 경우 window.top.location = "NEW_URL"을 사용해보십시오. 또는 iframe에서 코드를 실행하는 경우 parent.location = "NEW_URL"

+0

도움을 주셔서 감사합니다. 작동하지 않는 것 같습니다. –

관련 문제