日期:2014-05-18  浏览次数:20535 次

小弟遇到了一个关于变换光标的难题,请大家帮忙看一下如下:
<script   language= "javascript ">
function   changeCur()
{
//请问一下,在这个地方应当如何改变id为:temp的鼠标移动上去时(onmouseover)的光标为:min.cur??????????????
}
</script>
<img   id= "temp "   src=1.jpg   onmouseover= "this.style.cursor= 'img/max.cur ' "   onclick= "changeCur() ">


------解决方案--------------------
try:

<script language= "javascript ">
function changeCur()
{
obj = document.getElementById( "temp ");
obj.onmouseover = function(){this.style.cursor= 'img/min.cur ';}
}
</script>
<img id= "temp " src=1.jpg onmouseover= "this.style.cursor= 'img/max.cur ' " onclick= "changeCur() ">