日前让做关于网页中的斐波拉契数列,想了一下午才想出来,拿来大家和大家分享!
<html>
<head>
<style type="text/css">
A{
color:blue;
text-decoration:none;
}
A:hover{
color:red
}
.borderStyle
{
border-color:red;
border-style:solid;
border-width:1px;
}
</style>
<script>
function showResult()
{
var num1=1;
var num2=1;
var num3=0;
document.write(num1+" "+num2+" ");
for(var num5=0;num5<9000;num5++)
{
num3=num2+num1;
document.write(num3+" ");
num1=num2;
num2=num3;
}
}
</script>
</head>
<form name="myform">
<body onLoad="showResult()">
/*
<A href="#" onMouseOver="this.style.fontSize='24px'" onMouseOut="this.style.fontSize=''">你好!</A>
<input type="text" name="result" class="borderStyle" onMouseOver="this.style.borderColor='blue';this.style.borderWidth='3px'"
onMouseOut="this.style.borderColor='';this.style.borderWidth=''" width="800">
*/
</body>
</form>
</html>