The javascript implementation determines the state of the mouse

  • 2020-07-21 06:57:21
  • OfStack

The javascript implementation determines the state of the mouse


<script>
function dclick() {
form1.text.value = " You double-click the page! ";
}

function Click() {
form1.text.value += " You click the page ";
}

function down() {
form1.text.value = " You have pressed the mouse ";
}

function up() {
form1.text.value = " You release the mouse "
}
</script>
</head>

<body ondblclick="dclick()" onmousedown="down()" onmouseup="up()" onclick="click()">
<form action="" id="form1" name="form1" method="post">
<label>
<textarea name="text" cols="50" rows="2"></textarea>
</label>
</form>
</body>

This is the end of this article, I hope you enjoy it.


Related articles: