<HTML>
<HEAD>
<TITLE>Java-Script</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
var strings = "<b>ここの文字の色が変化します。<b>";
var speed = 400;
var x = 0;
var color = new init_color("red","blue","green","black","pink","darkcyan","darkblue");
function init_color() {
this.length = init_color.arguments.length;
for (var i = 0; i < this.length; i++) {
this[i] = init_color.arguments[i];
}
}
if(navigator.appName == "Netscape") {
document.write('<layer id="area"><center>'+strings+'</center></layer><br>');
}
if (navigator.appVersion.indexOf("MSIE") != -1){
document.write('<div id="area"><center>'+strings+'</center></div>');
}
function change_color(){
if(navigator.appName == "Netscape") {
document.area.document.write('<center><font color="'+color[x]);
document.area.document.write('">'+strings+'</font></center>');
document.area.document.close();
} else if (navigator.appVersion.indexOf("MSIE") != -1){
document.all.area.style.color = color[x];
}
(x < color.length-1) ? x++ : x = 0;
setInterval("change_color()",40);
}
//-->
</SCRIPT>
</HEAD>
<BODY onLoad=change_color()>
</BODY>
</HTML>
|