Javascript 外部链接cordova不工作

Javascript 外部链接cordova不工作,javascript,android,jquery,cordova,inappbrowser,Javascript,Android,Jquery,Cordova,Inappbrowser,使用codovaim尝试在浏览器上打开链接,但这不起作用;我不知道为什么,它只在webview中打开 <a href='#' onclick='openURL("http://google.com")'/>LInka</a> <a href='#' onclick='window.open("http://google.com", '_system')'/>LInka</a> function openURL(urlString){

使用
codova
im尝试在浏览器上打开链接,但这不起作用;我不知道为什么,它只在
webview
中打开

 <a href='#' onclick='openURL("http://google.com")'/>LInka</a> 
 <a href='#' onclick='window.open("http://google.com", '_system')'/>LInka</a>

    function openURL(urlString){
        myURL = encodeURI(urlString);
        window.open(myURL, '_blank');
    }

函数openURL(urlString){
myURL=encodeURI(urlString);
window.open(myURL,“\u blank”);
}

我也遇到了同样的问题,你的页面上是否包含cordova.js

<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> 
        <title>Hello World</title>
    </head>
    <body>

<a onclick="navigator.app.loadUrl('yourwebsite.com', { openExternal:true });">Links</a>
     <script type="text/javascript" src="cordova.js"></script>   
<script type="text/javascript">
function openURL(urlString){
    myURL = encodeURI(urlString);
    window.open(myURL, '_blank');
}
</script>

你好,世界
链接
函数openURL(urlString){
myURL=encodeURI(urlString);
window.open(myURL,“\u blank”);
}
尝试创建一个新项目,并确保index.html如下所示 不需要包括inappbrowser
祝你好运,希望它有帮助。

这可能对你有帮助吗@Satpal谢谢,我在看这个答案,但我不明白它会把
“u系统”
上的撇号改为引号
“\u系统”
。您使用
'
撇号来封装
onclick
事件函数,但是
''系统'
上的第一个撇号结束了封装。