电脑技术学习

移动边框滚动条后,滚动条会自动变色

dn001
<!-- 把下面代码加到<body>区域中 -->
<script language="JavaScript">
<!--
colours=new Array('ff0000','fff000','00ff00','ffa500','ff00ff','00ffff','ffffff')
function flash(){
var clrPos=Math.floor(Math.random()*colours.length)
with (window.document.body.style){
scrollbarTrackColor=document.bgColor;
scrollbarFaceColor=document.bgColor;
scrollbarArrowColor=colours[clrPos];
scrollbar3dLightColor=colours[clrPos];;
scrollbarHighlightColor=colours[clrPos];
scrollbarShadowColor=colours[clrPos];
scrollbarDarkShadowColor=colours[clrPos];
borderWidth=5;
borderStyle='solid';
borderColor=colours[clrPos];
}
}
if (document.all)window.document.body.onscroll=flash;
//-->
</script>