我在一个网站上工作,但由于某种原因 JQuery Mobile 拒绝工作。现在,我使用从 JQuery Mobile 示例中复制的代码制作了一个简单的演示页面,如下所示:
<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.css" />
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.1/jquery.mobile-1.2.1.min.js"></script>
</head>
<body>
<div data-role="page" id="1">
<div data-role="header">
<h1>My Title</h1>
</div><!-- /header -->
<div data-role="content">
<p>Hello world</p>
<a href='#2' data-transition='slide'>2</a>
</div><!-- /content -->
</div><!-- /page -->
<div data-role="page" id="2">
<div data-role="header">
<h1>My Title</h1>
</div><!-- /header -->
<div data-role="content">
<p>Hello world2</p>
<a href='#1' data-transition='slide'>1</a>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
由于某种原因,这不起作用,并返回一个错误说“TypeError:t.split 不是函数”。有人知道出了什么问题吗?