ie brower 点击用默认浏览器打开链接
作者:互联网
<script> function GetCurrentJumpUrl(){ var eleLink = document.getElementById('adLink'); if(eleLink){ var url = eleLink.getAttribute('href'); //alert(url); window.external.OpenNewUrlInChrome(url); return false; } return false; } </script>
<div class="main-box"> <div class="cont"> <!-- 这一段HTML是需要广告那边修改,加上id,加上 onclick事件 --> <a id="adLink" href="https://xxx.html" target="_blank"> <img src="https://xxx.jpg" alt="xxx" onclick="javascript: return GetCurrentJumpUrl();"></a> </div> </div>
标签:浏览器,GetCurrentJumpUrl,url,return,var,brower,false,eleLink,ie 来源: https://www.cnblogs.com/onlyou13/p/12376902.html