Get the type of cursor - Javascript CSS Style Property

Javascript examples for CSS Style Property:cursor

Description

Get the type of cursor

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<p id="myP" style="cursor:wait;">This is a paragraph. Mouse over me.</p>

<button type="button" onclick="myFunction()">Return type of cursor</button>

<script>
function myFunction() {//from  w w w.  j a v a2s. co  m
    console.log(document.getElementById("myP").style.cursor);
}
</script>

</body>
</html>

Related Tutorials