window.location 重定向到 IE11 和 Mozilla 中的主页



我正面临IE11&我已经使用了window或document.location.href and window.location.href将mozilla重定向到特定链接,并且它在所有浏览器和 IE版本7,8,9,10 ,但不用在 IE11 和Mozilla最新版本上工作,我已经搜索了很多东西,但是找不到任何解决方案。这是我尝试过的代码:

<?php 
    $conc_getval2 =  JURI::root()."index.php?option=com_reconciliation&view=reconciliation&Itemid=135".$conc_getval;
?>
<a href="#" name="Client" title="Client" onclick="sortsection('getorderClient'); ">
  <?php echo JText::_('Client'); ?>
  <?php if(isset($getorderClient) && $getorderClient !=""){ ?>
    <img border="0" width="20" id="ascdec_img" name="ascdec_img" alt="<?php echo $alttagClient; ?>" title="<?php echo $alttagClient; ?>" align="absmiddle" src="<?php echo $imgClient; ?>"  />
  <?php } ?>
</a>
<script type="text/javascript">
function sortsection(gettype){
    var geturl = "<?php echo $conc_getval2; ?>";
    switch(gettype) {
    //alert(gettype);
    case 'getorderClient':
        var getorder = "<?php echo $_GET['getorderClient']; ?>";
        if(getorder == ""){
            var getorder = 'DESC';
            var mod_url = geturl+"&getorderClient=DESC";
        } else {
            if(getorder == "DESC"){
                var mod_url = document.URL.replace("DESC", "ASC");
            } else {
                var mod_url = document.URL.replace("ASC", "DESC");
            }
        }
        window.event.returnValue = false;   
        window.location = mod_url;
        //document.location.href = mod_url;
        break;
    }
}
</script>

请帮助我解决这个问题。

window.event在Firefox中不存在,因此会产生JS错误。

相关内容

最新更新