我的客户要求我用他的内容克隆一个特定的移动网站。当我浏览那个网站时,我发现了这样的东西。
<a href="#listing.php?min=0&max=499999" class="ui-link">ABC</a>
我想知道的是这个链接是否指向同一页面或任何其他PHP页面内的PHP脚本。因为他们用了#标签,我觉得这是在同一个页面里。但这不是指向div id。
我是PHP新手,所以如果有人能给我一个关于这些东西的好的教程URL的链接,我会很高兴。
To jQuery Mobile这是一个常规链接到jQuery Mobile内部页面,或者换句话说,同一HTML内的另一个页面。但是为什么有人那样给他的主页打电话,我真搞不懂。
还有一件事要注意,具有该id的页面将无法引发任何jQuery Mobile页面事件。
可以在这里测试:http://jsfiddle.net/Gajotres/3278E/
HTML:<!DOCTYPE html>
<html>
<head>
<title>jQM Complex Demo</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
<div data-role="page" id="index">
<div data-theme="a" data-role="header">
<h3>
First Page
</h3>
</div>
<div data-role="content">
<a href="#listing.php" data-role="button">Another Page</a>
</div>
<div data-theme="a" data-role="footer" data-position="fixed">
</div>
</div>
<div data-role="page" id="listing.php">
<div data-theme="a" data-role="header">
<h3>
Second Page
</h3>
<a href="#index" class="ui-btn-left">Back</a>
</div>
<div data-role="content">
</div>
<div data-theme="a" data-role="footer" data-position="fixed">
</div>
</div>
</body>
</html>
这个URL公式使得一个支持ajax的web应用程序可以被搜索引擎抓取。这样做是为了提高搜索引擎优化(SEO)。数据是通过AJAX为人类访问者加载的,但URL记录了足够的信息,使爬虫可以在没有AJAX的情况下加载相同的数据。
详情请参阅Google的AJAX爬行指南或GreatFind的解释