Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

JQuery Test

<!DOCTYPE html>
<html>
<head>
<title>Try jQuery Online</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
    $("button").click(function() {
        if ($(this).text() === "Hide") {
            $("p").hide();
            $(this).text("Show");
        } else {
            $("p").show();
            $(this).text("Hide");
        }
    })
});

</script>
</head>
<body>
    <button type="button">Hide</button>
    <br>
    <br>
    
    Name: <input type="text" name="firstname">
    <br>
    
    <p id="greet">Welcome!</p>
    <p id="greet with name">Hello</p>
</body>
</html>

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.