js button

来源:互联网 发布:mac flac 编辑:程序博客网 时间:2024/06/04 18:19
<input type=button value="修改" width=20px high=15pxstyle={background-image:url(../images/button/button-1.png);}onMouseover=javascript:TextRtv.changeBackgroundImage1("../images/button/button-2.png")onMouseout=javascript:TextRtv.changeBackgroundImage2("../images/button/button-1.png")onclick=javascript:TextRtv.programSiteUpdate('+rowIndex+')></input>;

}


TextRtv.changeBackgroundImage1=function(image){
var el=event.srcElement;
if (el.tagName=="INPUT"&&el.type=="button"){
event.srcElement.style.backgroundImage = "url"+"("+image+")";
event.srcElement.style.cursor='hand';
}
}
TextRtv.changeBackgroundImage2=function(image){
var el=event.srcElement;
if (el.tagName=="INPUT"&&el.type=="button"){
event.srcElement.style.backgroundImage = "url"+"("+image+")";
}
}

cursor:pointer;

用JS使鼠标变小手onmouseover(鼠标越过的时候)
onmouseover="this.style.cursor='hand'"





cursor其他取值
auto :标准光标
default :标准箭头
pointer, hand :手形光标
wait :等待光标
text :I形光标
vertical-text :水平I形光标
no-drop :不可拖动光标
not-allowed :无效光标
help :帮助光标
all-scroll :三角方向标
move :移动标
crosshair :十字标
e-resize
n-resize
nw-resize
w-resize
s-resize
se-resize
sw-resize

0 0