key Events in js (practical 8)

 avatar
Rohit143
html
4 years ago
582 B
10
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Practical #8</title>
</head>
<body>
    <h2>Practical #8 :Create a webage to implement form events. Part II</h2>
    <hr>
    <h2><b><u>Key Events :</u></b></h2>
    <form>
        Name : <input type="text" onkeypress="keypress()">
        <br><br>
        E-mail : <input type="text" onkeyup="keyup()">
    </form>

</body>
<script>
    function keypress() {
        alert("The onkeypress event is fired");
    }
    function keyup() {
        alert("The onkeyup event is fired");
    }
</script>

</html>
Editor is loading...