码迷,mamicode.com
首页 > Web开发 > 详细

jQuery mobile报错 Uncaught TypeError: Cannot read property 'concat' of undefined

时间:2017-07-02 18:24:45      阅读:1628      评论:0      收藏:0      [点我收藏+]

标签:har   tle   charset   htm   viewport   dev   样式   char   meta   

写一个jQuery mobile的demo

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
    </head>
    <body>
        <div data-role="page">
            <div data-role="header">页眉</div>
            <div data-role="content">内容</div>
            <div data-role="footer">页脚</div>
        </div>
        <script src="js/jquery.min.js"></script>
        <script src="js/jquery.mobile-1.4.5.js"></script>
    </body>
</html>

用浏览器打开,发现没有样式,打开控制台发现报了一个错误

技术分享

上Stack Overflow查了一下,是因为jQuery mobile和jQuery的版本不匹配,我当前的jQuery mobile的版本是1.4.5,jQuery的版本3.2.1, jQuery重新下2版本以下的试试,我下了1.9.1是可行的

 

jQuery mobile报错 Uncaught TypeError: Cannot read property 'concat' of undefined

标签:har   tle   charset   htm   viewport   dev   样式   char   meta   

原文地址:http://www.cnblogs.com/zhengmiaohua/p/7106570.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!