【问题标题】:Cordova JQuery Error VS2015: Exception: Cannot call method 'concat' of undefinedCordova JQuery 错误 VS2015:异常:无法调用未定义的方法“concat”
【发布时间】:2016-07-28 09:38:33
【问题描述】:

当我使用 jquery.mobile 加载 html 时,我在 VS 中遇到此错误:

异常:无法调用未定义的方法“concat”

jquery.mobile-1.4.5js

我遵循了这个教程:https://wordpress.org/support/topic/-this-xml-file-does-not-appear-to-have-any-style-information-associated 开始使用 jQuery。

这是一个抛出此异常的 html 示例:

<!DOCTYPE html>
<html>
<head>
    <!--
        Customize the content security policy in the meta tag below as needed. Add 'unsafe-inline' to default-src to enable inline JavaScript.
        For details, see http://go.microsoft.com/fwlink/?LinkID=617521
    -->
    <!--<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: http://api.openweathermap.org https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">-->

    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
    <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
    <link rel="stylesheet" type="text/css" href="css/bb_Performance_Test_Page.css">
    <title>Performance</title>
</head>
<body>
    <div data-role="header" class="header">
        <h1 id="app-title">Performance</h1>
    </div>

    <button name="bb_prime_Button"
            onClick="bb_prime_Button_Click_Event()">
    Get Prime
    </button>
    <div class="prime">
        noData
    </div>
    <div class="time">
        noData
    </div>

    <script src="scripts/jquery-3.1.0.min.js"></script>
    <script src="scripts/jquery.mobile-1.4.5.min.js"></script>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="scripts/platformOverrides.js"></script>
    <script type="text/javascript" src="scripts/bb_Performance_Test_Page.js"></script>

</body>
</html>

我正在使用 Visual Studio 2015、混合 (Cordova) 应用项目、JQuery3.1.0 和 JQuery.mobile.1.4.5

【问题讨论】:

    标签: javascript jquery cordova jquery-mobile visual-studio-2015


    【解决方案1】:

    jquery.mobile-1.4.5的部分功能与jquery-3.1.0不兼容,请使用jquery-2.2.4版本。你可以从这里下载link

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多