我試圖用默認的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()的最佳方式是什麼?