在safari选项值中不重定向到url。在铬mozila,即它正在工作

时间:2017-02-17 06:07:13

标签: javascript jquery html safari

<select id="url">
   <option disabled="disabled" selected="selected">MPEP November 2015 Revision, Click your selection</option> 
   <option value="http://google.com>google</option>
   <option value="http://facebook.com>facebook</option>
</select>

<script type = 'text/javascript'>
   document.getElementById("url").onchange = function() {
      if(this.selectedIndex!==0) {
         var win=window.open(this.value, '_blank');
         win.focus();
      }        
   };
</script>

脚本 html 标记正在使用chrome,即和mozila,但它在Safari中不起作用,有什么问题这个脚本。我也可以检查移动设备上的代码。在移动设备上我也面临类似的问题,它不适用于Safari并在其他浏览器中工作。

0 个答案:

没有答案