<!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. LoadRunner性能测试中Controller场景创建需注意的几点

    在LR工具做性能测试中,最关键的一步是Controller场景的设计,因为场景的设计与测试用例的设计相关联,而测试用例的执行,直接影响最终的测试结果是怎么的,因此,我们每设计一种场景,就有可能是一个测 ...

  2. putty保持连接不自动段开

    经常在网上看到有人说自己利用putty工具登录服务器总是连接不上,这样的情况自己在刚接触putty时也遇到过.在 Connection 里面有个 Seconds between keepaliaves ...

  3. FineUI

    window间传值: Window1.GetSaveStateReference(new string[] { TextBox1.ClientID, ak.ClientID })收 ActiveWin ...

  4. NSArray 数组操作

    /*---------------------------创建数组------------------------------*/ //NSArray *array = [[NSArray alloc ...

  5. windows驱动编程(目录)

    目录 第一章 入门 配置开发环境 第一个程序 应用程序调用内核函数的流程

  6. Spring-----6、Spring3.0提供的Java配置管理

    转载自:http://blog.csdn.net/hekewangzi/article/details/45646279

  7. CAA调试

    在需要调试的Module(*.m)上右键,选择属性,命令位置选择你的framework目录    路径选择对应工程目录下的\intel_a(或者Win64    --    64位机器) 然后就可以尽 ...

  8. linux学习笔记之线程同步机制

    一.基础知识. 1:线程同步机制:互斥量,读写锁,条件变量,自旋锁,屏障. 1,互斥量:每个进程访问被互斥量保护的资源时,都需要先对互斥量进行判断. 1)互斥量重要属性:进程共享属性,健壮属性,类型属 ...

  9. javascript事件委托和jQuery事件绑定on、off 和one

    一. 事件委托什么是事件委托?用现实中的理解就是:有100 个学生同时在某天中午收到快递,但这100 个学生不可能同时站在学校门口等,那么都会委托门卫去收取,然后再逐个交给学生.而在jQuery 中, ...

  10. Ajax XMLHttpRequest对象的三个属性以及open和send方法

    (1)onreadystatechange 属性onreadystatechange 属性存有处理服务器响应的函数.下面的代码定义一个空的函数,可同时对 onreadystatechange 属性进行 ...