google怎麼弄背景音樂?
- 2022-11-07
常用部落格網頁特效程式碼
2005年 01月10日
部落格介紹特效、狀態列特效、收藏夾特效、首頁特效、如何加入背景音樂、加入百度、google搜尋欄…………
常用特效全包括。
說明:把下面的特效程式碼貼上到部落格介紹欄既可。但狀態列特效同時只能用一種。
特效一 部落格介紹欄文字滾動
可是設定為向上、向下、向左、向右。可以設定高度,滾動速度。
特效二 狀態列滾動文字介紹
自左向右,迴圈滾動。
<!——
function Helpor_net(seed)
{ var m1 = “你要顯示的文字,如:歡迎來到曉寒工作室” ;
var m2 = “” ;
var msg=m1+m2;
var out = “ ”;
var c = 1;
var speed = 120;
if (seed > 100)
{ seed-=2;
var cmd=“Helpor_net(” + seed + “)”;
timerTwo=window。setTimeout(cmd,speed);}
else if (seed <= 100 && seed > 0)
{ for (c=0 ; c < seed ; c++)
{ out+=“ ”;}
out+=msg; seed-=2;
var cmd=“Helpor_net(” + seed + “)”;
window。status=out;
timerTwo=window。setTimeout(cmd,speed); }
else if (seed <= 0)
{ if (-seed < msg。length)
{
out+=msg。substring(-seed,msg。length);
seed-=2;
var cmd=“Helpor_net(” + seed + “)”;
window。status=out;
timerTwo=window。setTimeout(cmd,speed);}
else { window。status=“ ”;
timerTwo=window。setTimeout(“Helpor_net(100)”,speed);
}
}
}
Helpor_net(100);
——>
特效三 狀態列文字打字機效果特效
var msg = “你要顯示的文字,如:歡迎來到曉寒工作室,請多提意見。謝謝! ” ;
var interval = 120
var spacelen = 120;
var space10=“ ”;
var seq=0;
function Helpor_net() {
len = msg。length;
window。status = msg。substring(0, seq+1);
seq++;
if ( seq >= len ) {
seq = 0;
window。status = ‘’;
window。setTimeout(“Helpor_net();”, interval );
}
else
window。setTimeout(“Helpor_net();”, interval );
}
Helpor_net();
特效四 點選即可把你的網站新增到瀏覽器的收藏選單下
onClick=“window。external。addFavorite(‘你的域名’,‘你的網站名’)” title=“你的網站名”>收藏本站
特效五 點選即可把你的網站設定為瀏覽器的起始頁
strhref=”/blog/window。location。href“;this。style。behavior=‘url(#default#homepage)’;this。setHomePage(‘你的域名’);” style=“CURSOR: hand”>設為首頁
特效六 瀏覽器的狀態列裡出現一個字接一個字往左跑的歡迎語!
<!——
function statusMessageObject(p,d) {
this。msg = MESSAGE
this。out = “ ”
this。pos = POSITION
this。delay = DELAY
this。i = 0
this。reset = clearMessage
}
function clearMessage() {
this。pos = POSITION
}
var POSITION = 100
var DELAY = 5
var MESSAGE = “你要顯示的文字,如:歡迎來到曉寒工作室 ”
var scroll = new statusMessageObject()
function scroller() {
for (scroll。i = 0; scroll。i < scroll。pos; scroll。i++) {
scroll。out += “ ”
}
if (scroll。pos >= 0)
scroll。out += scroll。msg
else scroll。out =
scroll。msg。substring(-scroll。pos,scroll。msg。length)
window。status = scroll。out
scroll。out = “ ”
scroll。pos——
if (scroll。pos < -(scroll。msg。length)) {
scroll。reset()
}
setTimeout (‘scroller()’,scroll。delay)
}
function snapIn(jumpSpaces,position) {
var msg = scroll。msg
var out = “”
for (var i=0; i {out += msg。charAt(i)} for (i=1;i {out += “ ”} out += msg。charAt(position) window。status = out if (jumpSpaces <= 1) { position++ if (msg。charAt(position) == ‘ ’) {position++ } jumpSpaces = 100-position } else if (jumpSpaces > 3) {jumpSpaces *= 。75} else {jumpSpaces——} if (position != msg。length) { var cmd = “snapIn(” + jumpSpaces + “,” + position + “)”; scrollID = window。setTimeout(cmd,scroll。delay); } else { window。status=“” jumpSpaces=0 position=0 cmd = “snapIn(” + jumpSpaces + “,” + position + “)”; scrollID = window。setTimeout(cmd,scroll。delay); return false } return true } snapIn(100,0); // ——> 特效七 滑鼠一碰就彈出 設為首頁 對話方塊 特效八 滑鼠一碰就彈出收藏本站對話方塊 onmouseover=“javascript:window。external。AddFavorite(‘你的域名’, ‘你的網站名’)” target=“_self”>收藏本站 特效九 加入背景音樂 border=“0” ALT=“Google” align=“absmiddle”>
<!—— Search Google ——>
特效十一 百度搜索欄
特效十二 顯示ip及地址