|
var thissize=20 |
澹版槑涓涓彉閲忥紝瀹氫箟瀛楃涓查暱搴︺?/td> |
var textfont="闅朵功" | 澹版槑涓涓彉閲忥紝瀹氫箟瀛椾綋銆?/td> |
var textcolor= new Array() textcolor[0]="000000" textcolor[1]="000000" textcolor[2]="000000" textcolor[3]="111111" textcolor[4]="222222" textcolor[5]="333333" textcolor[6]="444444" textcolor[7]="555555" textcolor[8]="666666" textcolor[9]="777777" textcolor[10]="888888" textcolor[11]="999999" textcolor[12]="aaaaaa" textcolor[13]="bbbbbb" textcolor[14]="cccccc" textcolor[15]="dddddd" textcolor[16]="eeeeee" textcolor[17]="ffffff" textcolor[18]="ffffff" |
瀹氫箟涓涓柊鏁扮粍錛屽茍鍒楀嚭鍏朵腑鐨勫厓绱犮?/td> |
var message = new Array() message[0]="媧仼鍦ㄧ嚎 姹傜煡鏃犻檺" message[1]="鍗佷簩浜夸漢鐨勭綉涓婂ぇ瀛? i_message=0 |
瀹氫箟鏂版暟緇勶紝騫跺垪鍑哄叾涓殑鍏冪礌銆?/td> |
var i_strength=0 var i_message=0 |
澹版槑鍙橀噺錛屽茍璧嬪垵鍊箋?/td> |
var timer | 澹版槑鍙橀噺銆?/td> |
function glowtext() { | 瀹氫箟鍑芥暟銆?/td> |
if(document.all) |
濡傛灉鏄疘E嫻忚鍣紝鎵ц浠ヤ笅璇彞銆?/td> |
{ if (i_strength <=17) |
濡傛灉i_strength <=17錛屾墽琛屼互涓嬭鍙ャ?/td> |
{ glowdiv.innerText=message[i_message] document.all.glowdiv.style.filter= "glow(color="+textcolor[i_strength]+", strength=4)" i_strength++ |
杈撳嚭i_message鐨勫鹼紝鐒跺悗i_strength閫掑姞錛屽嵆浜害澧炲姞銆?/td> |
timer=setTimeout("glowtext()",100) } |
姣?00姣錛岃皟鐢ㄤ竴嬈lowtext鍑芥暟銆?/td> |
else { clearTimeout(timer) setTimeout("deglowtext()",1500) } |
濡傛灉i_strength 澶т簬17浜嗭紝璋冪敤deglowtext鍑芥暟錛屽嵆浜害寮濮嬪彉鏆椼?/td> |
} } function deglowtext() { if(document.all) { if (i_strength >=0) |
瀹氫箟deglowtext鍑芥暟錛屽茍褰撴祻瑙堝櫒鏄疘E鏃訛紝i_strength >=0鏃訛紝鎵ц浠ヤ笅璇彞銆?/td> |
{ glowdiv.innerText=message[i_message] document.all.glowdiv.style.filter= "glow(color="+textcolor[i_strength]+", strength=4)" i_strength-- |
杈撳嚭i_message鐨勫鹼紝鐒跺悗i_strength閫掑噺錛屽嵆浜害鍑忓急銆?/td> |
timer=setTimeout("deglowtext()",100) } else { clearTimeout(timer) i_message++ |
姣?00姣錛岃皟鐢ㄤ竴嬈lowtext鍑芥暟錛屽噺鍒版渶鏆楋紝鎺ョ潃鎵ц涓嬩竴涓瓧絎︿覆銆?/td> |
if (i_message>=message.length) {i_message=0} i_strength=0 intermezzo() } } } |
濡傛灉鏁扮粍message涓殑瀛楃涓查兘鎵ц瀹屼簡錛屼竴鍒囨仮澶嶅垵濮嬭緗紝騫舵墽琛宨ntermezzo鍑芥暟銆?/td> |
function intermezzo() |
瀹氫箟涓涓嚱鏁癷ntermezzo銆?/td> |
{ glowdiv.innerText="" setTimeout("glowtext()",1500) } |
1.5縐掑悗錛岄噸鏂拌皟鐢╣lowtext鍑芥暟銆?/td> |
濡傛灉涓巃,form瀵硅薄錛宨mage瀵硅薄錛宎pplet瀵硅薄鐩稿搴旂殑html鏍囪涓瀹氫簡name鎬ц川錛屽畠鐨勫煎皢琚敤浣渄ocument瀵硅薄鐨勫睘鎬у悕錛岀敤鏉ュ紩鐢ㄧ浉搴旂殑瀵硅薄錛屽叾浠栫殑瀵硅薄鍒欎笉鍙互銆?
鍙﹀,input絳夊鏋滀綔涓篺orm鐨勫瓙鍏冪礌,鍒欑洿鎺ョ敤inputName鎴栬卍ocument.inputName鏉ュ紩鐢ㄦ瀵硅薄灝辨槸閿欒鐨?蹇呴』浣跨敤formName.inputName寮曠敤,鍚﹀垯灝卞彲浠ヤ嬌鐢╥nputName鏉ュ紩鐢?
鍙﹀搴旇娉ㄦ剰鍒版湁寰堝騫蟲椂鐢ㄧ殑鍏冪礌閮芥病鏈塶ame.
濡傛灉鎯沖紩鐢ㄤ竴涓湁id鐨勫厓绱?鍙兘鐢↖d鎴栬卍ocument.getElementById,document.all.id鏉ュ紩鐢?
浣嗘槸璞¤繖鏍風殑鍏冪礌,鎵浠ヨ薄<a href="......" name="linkname" id="linkid">......</a>榪欐牱鐨?
鍙互鐢?
linkid.href;
linkname.href;
document.all.linkid.href;
document.all.linkname.href;
document.getElementById("linkid").href;
document.getElementsByName("linkname")[0].href鏉ュ紩鐢?
all鏄竴涓泦鍚堬紝鍖呭惈鎵鏈塰tml瀵瑰儚鐨勯泦鍚堬紝鍐欎竴涓▼寮忥紝鍙互瀛樺彇鍒版墍鏈夌殑瀵瑰儚銆傚儚榪欐牱錛?
<script language="javascript">
var obj="";
for(i=0;i<document.all.length;i++)
obj+=document.all[i].tagName+";";
alert(obj);
</script>
娉ㄦ剰瑕佹妸紼嬪紡鏀懼埌</html>涔嬪悗鍝︺?