我试图用默认的ios系统浏览器而不是inappbroswer插件打开链接。以下代码不能用系统浏览器打开:Phonegap jQuery onClick处理程序
function openlink(x){
window.open(x.href, "_system");
return false;
}
<h1><a href="http://google.com" class="exLink">google</a></h1>
<h1><a href="http://yahoo.com" class="exLink">yahoo</a></h1>
$("html").click(function(){
$(".exLink").attr("onclick", "javascript:return openlink(this)");
});
此代码确实在系统浏览器中打开,但它不是我所需要的。
<h1><a href="http://google.com" onClick='javascript:return openlink(this)'>google</a></h1>
获得onclick attr()的最佳方式是什么?