2007-8-25 07:45 PM tsz-魁.
語法[轉]

地 震 視 窗
<script Language="JavaScript">
netscape = (navigator.appName == "Netscape");
n4 = netscape && (parseInt(navigator.appVersion) >= 4);
explorer = (navigator.appName == "Microsoft Internet Explorer");
ie4 = explorer && (parseInt(navigator.appVersion) >= 4);
var time=0,max_time=5;
function shake(n) {
if (n4 || ie4) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}

function shake2() {
if(max_time==0) {
shake(2);
setTimeout('shake2()',400);
}
else if(time<max_time) {
time++;
shake(2);
setTimeout('shake2()',400);
}
}
shake2();
</SCRIPT>

按圖進入語法

<script type='text/javascript'>
// intro splash page by micron
// for more xanga scripts and help go to createblog.com

// change this url to an image of your choice
var image ='pic ge 綱址f';

function enterSite() {
document.getElementById('splash').style.display = 'none';
var content = document.getElementsByTagName("center");
for (var i=0; i<content.length;i++) {
content.style.display = 'block';
}
return false;
}

if (document.title.slice(-10) == 'Xanga Site') {
document.write('</span></center><style type="text/css"> center {display:none;} .image {border:1px dotted #cc6666;} </style><table height="60%" width="60%" id="splash"><tr><td align="left" valign="left" style="text-align:left !important;"><a href="#" ><img src="'+ image +'" border="0" class="image"></a></td></tr></table><center><span>');
}
</script>
生日倒數

<!-- begin code provided by createblog.com -->
<!-- begin code provided by createblog.com -->
</tr><script language="JavaScript1.2">

var today = new Date;
var Future0 = new Date;

var BirthMonth = 月份;
var BirthDate = 日期;
var BirthYear = 年份;
BirthMonth--;

Future0.setMonth(BirthMonth, BirthDate);
if (Date.parse(today) > Date.parse(Future0))
{
Future0.setFullYear(today.getYear()+1);
age = (today.getYear() - BirthYear) + 1;
}
else
{age = today.getYear() - BirthYear;}

if (age % 10 == 0)
ageend = 'th';
else if (age % 10 == 4)
ageend = 'th';
else if (age % 10 == 5)
ageend = 'th';
else if (age % 10 == 6)
ageend = 'th';
else if (age % 10 == 7)
ageend = 'th';
else if (age % 10 == 8)
ageend = 'th';
else if (age % 10 == 9)
ageend = 'th';
else if (age % 10 == 1)
ageend = 'st';
else if (age % 10 == 2)
ageend = 'nd';
else if (age % 10 == 3)
ageend = 'rd';


var faraevent = "<font color=#99CC33><i>my birthday</font>";

today1 = Date.parse(today);
future1 = Date.parse(Future0);
secleft = future1 - today1;
miliday = 24 * 60 * 60 * 1000;
daysleft = secleft/miliday;
daysleftint = Math.round(daysleft);

if (daysleftint > 1)
document.write(" ", daysleftint, " days until <font color=#99CC33>my <i>", age, ageend, "</i> birthday</font>");
else if (daysleftint == 1)
document.write("<font color=#99CC33>my <i>", age, ageend, "</i> birthday</font> is tomorrow");
else if (today1 == future1)
document.write("<font color=#99CC33>my <i>", age, ageend, "</i> birthday</font> is today");
else
document.write("passed");
</script><br>
<!-- end code provided by createblog.com -->

2007-12-26 06:32 PM Han_love_you
巧巧用呀...
thz

2008-1-8 06:22 PM 丫洛
不 錯 的 喔`
Supp0rt!`

2008-1-16 02:23 PM 啊king
唔該曬...]]

頁: [1]
查看完整版本: 語法[轉]


Powered by Discuz! Archiver 5.5.0  © 2001-2006 Comsenz Inc.