运行下面的代码时,当我想打开汽车页面时,firefox 17.0.5会给出一个“错误加载消息”。但它在IE8中正常工作。JQuery手机多页面
然后我在这里找到一个例子 http://jquerymobile.com/demos/1.0/docs/pages/multipage-template.html 我用firefox 17.0.5打开那个网站,工作。然后我查看了源代码,与我的结构几乎相同。但是当我下载html并运行它时,IE8和FF都不起作用。这里有什么问题?我从另一个项目链接到jQuery moible,对web开发一无所知。请帮忙。 :(
<!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>
<!-- Start of first page -->
<div data-role="page" id="menu">
<div data-role="header">
<h1>Menu</h1>
</div><!-- /header -->
<div data-role="content">
<p>What vehicles do you like?</p>
<p><a href="#one">Cars</a></p>
<p><a href="#two">Trains</a></p>
<p><a href="#three">Planes</a></p>
</div><!-- /content -->
<div data-role="footer">
<h4>Page Footer</h4>
</div><!-- /header -->
</div><!-- /page -->
<!--/Page 2 -->
<div data-role="page" id="one">
<div data-role="header">
<h1>Cars</h1>
</div><!-- /header -->
<div data-role="content">
<p>Content about cars</p>
</div><!-- /content -->
<div data-role="footer">
<h4>Cars</h4>
</div><!-- /header -->
</div><!-- /page -->
</body>
</html>
你在萤火虫控制台上得到任何错误? – dreamweiver 2013-04-30 11:50:27
@dreamweiver嗨,我googled如何使用萤火虫,这是强大的工具谢谢你的提示。但是,我在FF中运行粘贴的html,firebug-> console-> errors,它是空的。 – Tiina 2013-04-30 12:07:08
:这里检查一下,我觉得它的工作很好.http://jsfiddle.net/dreamweiver/mhN4X/ – dreamweiver 2013-04-30 12:18:19