`
mzh_2008beijing
  • 浏览: 230704 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

onmouseover事件鼠标变小手的代码实现方法

阅读更多
onmouseover事件鼠标变小手的代码实现方法有二,如下:
1、javaScript:
 
onmouseover="this.style.cursor='hand'"

  例如:
<input type="button" onmouseover="this.style.cursor='hand'"/>


2、CSS:
cursor:pointer;

例如:
<input type="button" style="cursor:pointer;">


很显然,第二种方法即用CSS设置这个小特效代码更简洁。所以推荐第二种方法。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics