變色捲軸 滑鼠指捲軸會變色
但不可與任何滑鼠帶字共用
scrollbarArrowColor="white 三角形箭咀色
scrollbarArrowColor="black 捲軸底色
("pink","blue"); 是原本色
("yellow","red"); 是指向色 -
- <script language="javascript1.2">
- function clrBar(line,face){
- with(document.body.style){
- scrollbarDarkShadowColor=line;
- scrollbar3dLightColor=line;
- scrollbarArrowColor="white";
- scrollbarBaseColor=face;
- scrollbarFaceColor=face;
- scrollbarHighlightColor=face;
- scrollbarShadowColor=face;
- scrollbarTrackColor="black";
- }}function setcolor(){
- var w = document.body.clientWidth;
- var h = document.body.clientHeight;
- var x = event.clientX;
- var y = event.clientY;
- if(x>w) clrBar("yellow","red");
- else clrBar("pink","blue");
- }if (document.all){clrBar(null,null);
- document.onmousemove=setcolor;
- }</script>
複製代碼 |