157、文字全屏显示

157、文字全屏显示

脚本说明:

把如下代码加入<body>区域中

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

var matrix_window;

function MatrixWrite(string, bold, italic, speed) {

var height = window.screen.height;

var width = window.screen.width;

var win_dimensions = "height = " + eval(height + 10) + ", width = " + eval(width + 30);

matrix_window = window.open("blank.htm", "matrix_window", win_dimensions);

matrix_window.document.open("text/html", "replace");

var i;

var timer = 0;

if(matrix_window.moveTo)

matrix_window.moveTo(-10, -30);

if(matrix_window.resizeBy)

matrix_window.resizeBy(0, 50);

matrix_window.document.write("<body bgcolor=000000 text=00ff00 onBlur='self.focus()'>");

matrix_window.document.write("<font face=system>");

if(bold == true) matrix_window.document.write("<b>");

if(italic == true) matrix_window.document.write("<i>");

for(i = 0; i <= string.length; i++) {

timer += (Math.random() * speed);

setTimeout("matrix_window.document.write('" + string.charAt(i) + "');", timer);

}

timer += 2000;

setTimeout("matrix_window.close()", timer);

}

var messages = new Array("欢迎你光临,网页制作特效,请多提意见!!!", "欢迎你光临,网页制作特效,请多提意见!!!", "欢迎你光临,网页制作特效,请多提意见!!!");

function GetRndIndex() {

return (parseInt(Math.random() * messages.length));

}

function WriteRndMsg(bold, italic, speed) {

MatrixWrite(messages[GetRndIndex()], bold, italic, speed);

}

//  End -->

</script>

<table>

<tr>

<td>

<a href="javascript:WriteRndMsg(false, false, 750)">正常字体</a>

<br>

<a href="javascript:WriteRndMsg(true, false, 750)"><b>粗体</b></a>

<br>

<a href="javascript:WriteRndMsg(false, true, 750)"><i>斜体</i></a><br>

<a href="javascript:WriteRndMsg(true, true, 750)"><b><i>既是粗体又是斜体</i></b></a>

<br>

<a href="javascript:MatrixWrite('多谢你的光临!!!', false, false, 750)">正常的字符串</a>

</td>

</tr>

</table>

 

Write a comment

Comments: 0