我想問點先可以整到個XANGA D 日誌可以一頁一编日記.?20點!

2007-05-31 4:38 am
我係用FREE個個XANGA
如果要用CODE先得,
請俾CODE我同埋講明要擺係邊!(例:HEADER HTML個度 )
THX A LOT!

回答 (1)

2007-06-02 2:06 am
✔ 最佳答案
我只是找到改成一頁三篇日記既 Code
可惜我並不熟悉 JavaScript
不能將它轉為一頁一篇
如你仍覺得適合的話
只要將它貼在 Website Stats 便可以了~


<script>
// display three entries
// T CM xanga help
if(location.pathname=="/home.aspx"){
var longer = false;
var tds = document.getElementsByTagName('td');
for(i=0; i<tds.length;i++)
{
booga = tds[i].innerHTML.indexOf('blogheader');
if(booga==11){longer=false;break;}
boogie = tds[i].innerHTML.indexOf('javascript');
if(boogie == 19){longer=true;break;}
}
var tables = tds[i].getElementsByTagName('table');
var numBreaks = 0;
var x = 0;
if(longer==true){x=5}else{x=3}
for(j=x; j<tables.length;j++)
{
numBreaks += tables[j].getElementsByTagName('br').length;
tables[j].style.display='none';
}
var divs = tds[i].getElementsByTagName('div');
for(j=2+(2*2)-0; j<divs.length;j++)
{
divs[j].style.display='none';
}
var breaks = tds[i].getElementsByTagName('br');
for(j=breaks.length-5-numBreaks;j<breaks.length;j++)
{
breaks[j].style.display='none';
}
var horizontals = tds[i].getElementsByTagName('hr');
var j = horizontals.length-1;
horizontals[j].style.display='none';
}
</script>


收錄日期: 2021-04-13 16:47:08
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070530000051KK03740

檢視 Wayback Machine 備份