這些都是增加(可能由動態服務器端代碼)自定義屬性爲<li>
元素。
它本身並不做任何事情,這就像給名或ID相同的元件, - 一些數據,可能會或可能不會被一些其他的代碼使用。
良好的猜測是,該網站有一些客戶端腳本識別列表項內的嵌套鏈接上點擊,取出來的數據列表項元素,並建立正確的URL或發送正確的AJAX請求服務器或者其他數據。
研究客戶端腳本可以讓您更好地理解這些屬性背後的真正目的。 :)
編輯:在您的情況,JS文件http://media1.shopto.net/scripts/site.js是使用這些屬性的基礎上動態鏈接的href
,這裏是代碼從該文件相關的塊:
// The current href on each link needs to have the platform pre-pended.
// So store the current href before we change it.
link.submenu.getElements('ul.category a').each(function(sublink) {
var count = sublink.getParent().get('site:'+platform.replace('%20',''));
if(count==null && !sublink.getParent().get('site:all'))
{
sublink.getParent().removeChild(sublink);
} else {
sublink.set('href', href + sublink.get('href').replace('#',''));
/*
if(count!=null)
{
sublink.set('text',sublink.get('text') + ' (' + count + ')');
}
*/
}
});
看起來像一個XML名稱空間(http://en.wikipedia.org/wiki/XML_namespace)。你有這個片段最初的URL嗎? – 2011-01-23 16:12:50
謝謝,它來自這個網站:http://www.shopto.net/ – Dave 2011-01-23 16:16:33
看到我的編輯,快速的源代碼搜索透露了這個祕密。 :)順便說一句piquadrat不會看到你的評論,除非你使用`@`來通知..例如`@ piq`會在你下次發表評論時向他發送通知。 – 2011-01-23 16:30:49