XANGA改野""

2006-11-06 6:53 am
我想問可以點樣整令d個日期(eg 改做其他字樣)
仲想問點樣可以改到name birthday email it 呢d字
最後問點改到個title做中文(打中文會show左d怪number)
唔該哂大家!!!

回答 (2)

2006-11-07 3:48 am
✔ 最佳答案
1. 日期
example: * 29-APR-2005 FRI = ]
<script type="text/javascript">
// ====================
// listing of available constants (using date
// "Tuesday, March 16, 2004" as an example):
// dd = 16
// ddd = Tue
// dddd = Tuesday
// mm = 03
// mmm = Mar
// mmmm = March
// yy = 04
// yyyy = 2004
// ====================

function formatEntryDate()
{
// adjust the dateFormatStr below as you see fit
// ========================================
dateFormatStr = '<table width="75%"><tr><td style="border-top: none; border-bottom: 2px dashed #999999; border-left: none; border-right: none; background-color: #ffccff; background-image: none; text-align: left; font-family: verdana; font-size: 15px; font-color: #000000; font-weight: bold;">* dd-mmm-yyyy ddd = ]</td></tr></table>';
// ========================================
function getMonthNr(sMonth)
{
months = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
for (var n = 0; n < months.length; ++n)
{
if (months[n] == sMonth)
{
if ( n + 1 < 10)
return '0' + (n + 1).toString()
else
return (n + 1).toString();
}
}
}
allDivs = document.getElementsByTagName('div');
for (var i = 0; i < allDivs.length; ++i)
{
if (allDivs[i].className == 'blogheader')
{
newDateFormat = dateFormatStr;
entryDate = allDivs[i].innerHTML;
// day
dayLong = entryDate.substr(0, entryDate.indexOf(',')); // dddd
dayShort = dayLong.substr(0, 3); // ddd
tempStr = entryDate.substr(dayLong.length + 1);
dayNr = tempStr.substr(tempStr.indexOf(',') - 2, 2); // dd
newDateFormat = newDateFormat.replace('dddd', dayLong);
newDateFormat = newDateFormat.replace('ddd', dayShort);
newDateFormat = newDateFormat.replace('dd', dayNr);
// month
monthLong = tempStr.substr(1, tempStr.indexOf(',') - 3); // mmmm
monthShort = monthLong.substr(0, 3); // mmm
monthNr = getMonthNr(monthShort); // mm
newDateFormat = newDateFormat.replace('mmmm', monthLong);
newDateFormat = newDateFormat.replace('mmm', monthShort);
newDateFormat = newDateFormat.replace('mm', monthNr);
// year
yearLong = tempStr.substr(tempStr.indexOf(',') + 2); // yyyy
yearShort = yearLong.substr(2); // yy
newDateFormat = newDateFormat.replace('yyyy', yearLong);
newDateFormat = newDateFormat.replace('yy', yearShort);
allDivs[i].innerHTML = newDateFormat;
}
}
}
formatEntryDate();
</script>
請自行修改紅色字既地方
2. 改到name birthday email it 呢d字
http://help.xanga.com/replacelinks.htm
(replace eprops, comment, subscribe,
subscription, sign out, Guestbook, e-mail it etc.)
name,b-day 等要自製layout 才可改
3. 改到個title做中文
你在type script前,
remember to change the 編碼encloding to 繁體中文
及avoid打口語(e.g: o既;  etc.) 就行了
希望幫到你:)
參考: kkx3; myself
2006-11-06 7:04 am
2000FUN
係專教人正XG架!!
有好多野架果度
OR
http://lthung.net/
呢個網都有好多
參考: http://lthung.net/ AND 2000FUN


收錄日期: 2021-04-27 13:06:25
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20061105000051KK06271

檢視 Wayback Machine 備份