কার্সার প্রপার্টি কার্সারের ধরন সেট করে বা ফেরত দেয় যা কার্সার প্রপার্টির জন্য প্রদর্শিত হবে।
নিচে জাভাস্ক্রিপ্ট কার্সার প্রপার্টি -
বাস্তবায়নের জন্য কোড দেওয়া হলউদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
</style>
</head>
<body>
<h1>JavaScript Cursor property</h1>
<p class="sample"></p>
<h3>
Hover the mouse over the above paragraph after clicking the below button
</h3>
<button class="Btn">Change Cursor</button>
<script>
let sampleEle = document.querySelector(".sample");
document.querySelector(".Btn").addEventListener("click", () => {
sampleEle.style.cursor = "crosshair";
});
</script>
</body>
</html> আউটপুট

"Cursor পরিবর্তন করুন" বোতামে ক্লিক করলে -
