<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<script language="JavaScript"> function setCursorByID(id, cursorStyle) {
var elem;
if (document.getElementById && (elem = document.getElementById(id))) {
if (elem.style)
elem.style.cursor = cursorStyle;
}
} </script>
</head>
<body>
<span style="cursor: auto;">auto</span>
<span style="cursor: move;">move</span>
<span style="cursor: no-drop;">no-drop</span>
<span style="cursor: col-resize;">col-resize</span>
<span style="cursor: all-scroll;">all-scroll</span>
<span style="cursor: pointer;">pointer</span>
<span style="cursor: not-allowed;">not-allowed</span>
<span style="cursor: row-resize;">row-resize</span>
<span style="cursor: crosshair;">crosshair</span>
<span style="cursor: progress;">progress</span>
<span style="cursor: e-resize;">e-resize</span>
<span style="cursor: ne-resize;">ne-resize</span>
<span style="cursor: default;">default</span>
<span style="cursor: text;">text</span>
<span style="cursor: n-resize;">n-resize</span>
<span style="cursor: nw-resize;">nw-resize</span>
<span style="cursor: help;">help</span>
<span style="cursor: vertical-text;">vertical-text</span>
<span style="cursor: s-resize;">s-resize</span>
<span style="cursor: se-resize;">se-resize</span>
<span style="cursor: inherit;">inherit</span>
<span style="cursor: wait;">wait</span>
<span style="cursor: w-resize;">w-resize</span>
<span style="cursor: sw-resize;">sw-resize</span>
<div>
<a id="e1h" href="#" style="cursor: help;" onclick="setCursorByID('e1','help');return false;">help</a>
<a id="e1w" href="#" style="cursor: wait;" onclick="setCursorByID('e1','wait');return false;">wait</a>
<a id="e1m" href="#" style="cursor: move;" onclick="setCursorByID('e1','move');return false;">move</a>
<a id="e1c" href="#" style="cursor: crosshair;" onclick="setCursorByID('e1','crosshair');return false;">crosshair</a>
<a id="e1t" href="#" style="cursor: text;" onclick="setCursorByID('e1','text');return false;">text</a>
<a id="e1a" href="#" style="cursor: default;" onclick="setCursorByID('e1','default');return false;">default</a>
<a id="e1a" href="#" style="cursor: pointer;" onclick="setCursorByID('e1','pointer');return false;">pointer</a>
<a id="e1a" href="#" style="cursor: auto;" onclick="setCursorByID('e1','auto');return false;">auto</a>
</div>
<div>
<a id="e1" href="#" onclick="setCursorByID('e1','help');return false;">test</a>
</div>
</body>
</html>

原文:http://www.javascripter.net/faq/stylesc.htm

JavaScript Set Cursor Style的更多相关文章

  1. JavaScript动态操作style

    1.易错:修改元素的样式不是设置class属性,而是className属性.class是JS的一个保留关键字. 2.易错:单独修改样式的属性使用"style.属性名"3.注意在cs ...

  2. Maintainable JavaScript(编写可维护的JavaScript) PART I Style Guidelines

    “Programs are meant to be read by humans and only incidentally( 顺便:偶然地:附带地) for computers to execute ...

  3. Javascript动态创建 style 节点

    有很多提供动态创建 style 节点的方法,但是大多数都仅限于外部的 css 文件.如何能使用程序生成的字符串动态创建 style 节点,我搞了2个小时. 静态外部 css 文件语法: @import ...

  4. 原生JavaScript HTML DOM Style 对象参考

    Style 对象属性 可以在Style对象上使用以下属性: “CSS”列指示定义属性的CSS版本(CSS1,CSS2或CSS3). 属性 描述 CSS alignContent 当项目不使用所有可用空 ...

  5. javascript中的style只能取到在HTML中定义的css属性

    如果在css中定义的 li{ width:100px; left:100px; top:; position:absolute; font-style:normal; } 这样执行: oli[0].s ...

  6. JavaScript HTML DOM Style flexWrap 属性

    flexWrap 属性 flexWrap属性指定flex项是否应该换行. 注意:如果元素不是flex项,则flexWrap属性不起作用. 如果必要,使flex换行: document.getEleme ...

  7. style="visibility: hidden" 和 style=“display:none”区别

    大多数人很容易将CSS属性display和visibility混淆,它们看似没有什么不同,其实它们的差别却是很大的. visibility属性用来确定元素是显示还是隐藏的,这用visibility=& ...

  8. 【温故而知新-Javascript】使用事件

    1. 使用简单事件处理器 可以用几种不同的方式处理事件.最直接的方式是用事件属性创建一个简单事件处理器(simple event handler).元素为它们支持的每一种事件都定义了一个事件属性.举个 ...

  9. 使用JavaScript创建我的分页

    把下面的方法放到一个js文件,页面引用他就行了 JavaScript function PageList(PageSize, PageIndex, TotalCount, ParList) { $(& ...

随机推荐

  1. Unity 进度条3D制作(3D版)

    昨天我们一起学习了2D进度跳的制作,那么趁着我们脑海中还残存昨日的记忆,今天继续学习另一种方法: 实现思路:当鼠标悬浮Start按钮->实例化物体并显示进度->100/100->进入 ...

  2. NET基础课--XML基础

    id level是属性,title为子节点 接下来操作子节点 比较xml的处理方式: 1和3适合数据量小的时候.

  3. Java学习——继承

    将学生工人的共性描述提取出来,单独进行描述,只要让学生和工人与单独描述的这个类有关系,就可以了. 继承:1,提高了代码的复用性.2,让类与类之间产生了关系.有了这个关系,才有了多态的特性. 注意:千万 ...

  4. ios app相互调用

    被调用app配置 - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NS ...

  5. SQL case when

    jack    1tom    2anni    3poly    4 select buyer_name, ( case ' then '东' ' then '南' ' then '西' ' the ...

  6. iwebshop 改版页面

  7. hyper中安装wdOS-1.0-x86_64(wdlinux)遇到的网卡问题

    11/23 0:30 by vmaxhyper中安装wdOS-1.0-x86_64(wdlinux) 日志: 遇到的问题: 1.装完找不到网卡eth0,只有一只loopback的Lo. 原因:cent ...

  8. PowerDesigner15在生成SQL时报错Generation aborted due to errors detected during the verification of the mod

    转载: http://blog.csdn.net/successful555/article/details/7582154 PowerDesigner中如何设置字符编码为GBK或者GB2312 ht ...

  9. mysql 开启事务

    START TRANSACTION, COMMIT, and ROLLBACK Syntax 开始事务,提交和回滚语法 那些语句提供了控制事务的使用: 1.START TRANSACTION 或者BE ...

  10. TCP 协议三次握手过程解析带实例

    TCP(Transmission Control Protocol) 传输控制协议 TCP是主机对主机层的传输控制协议,提供可靠的连接服务,采用三次握手确认建立一个连接: 位码即tcp标志位,有6种标 ...