Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <title>Title</title>
- <!-- Required meta tags -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- Bootstrap CSS v5.3.0 -->
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"
- integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM"
- crossorigin="anonymous">
- </head>
- <body>
- <button class="btn btn-primary ms-4"> Bottone normale</button>
- <button class="btn btn-primary btn-lg"> Bottone GRANDE</button>
- <button id="btn" class="btn btn-primary btn-sm"> Bottone piccolo</button>
- <br><br>
- <!-- via attributi -->
- <span id="span">
- <button id="bottone_con_stato" class="btn btn-primary btn-lg" disabled> Bottone disabilitato</button>
- </span>
- <!-- gruppi -->
- <div class="btn-group mx-auto">
- <button type="button" class="btn btn-primary">sx</button>
- <button type="button" class="btn btn-primary">centro</button>
- <button type="button" class="btn btn-primary">dx</button>
- </div>
- <br><br>
- <p class="bg-body-secondary mx-auto w-25">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam, officiis! Velit ut molestiae, asperiores dignissimos illum, dolorum magnam hic odit inventore eligendi temporibus recusandae sit illo ex. Blanditiis, nostrum quam?
- </p>
- <p class="bg-danger mx-auto w-25">
- Lorem ipsum dolor sit amet consectetur adipisicing elit. Quam, officiis! Velit ut molestiae, asperiores dignissimos illum, dolorum magnam hic odit inventore eligendi temporibus recusandae sit illo ex. Blanditiis, nostrum quam?
- </p>
- <!-- <p><a href="#" class="link-primary">Primary link</a></p>
- <p><a href="#" class="link-secondary">Secondary link</a></p>
- <p><a href="#" class="link-success">Success link</a></p>
- <p><a href="#" class="link-danger">Danger link</a></p>
- <p><a href="#" class="link-warning">Warning link</a></p>
- <p><a href="#" class="link-info">Info link</a></p>
- <p><a href="#" class="link-light">Light link</a></p>
- <p><a href="#" class="link-dark">Dark link</a></p>
- <p><a href="#" class="link-body-emphasis">Emphasis link</a></p> -->
- <!-- Bootstrap JavaScript Libraries -->
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"
- integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz"
- crossorigin="anonymous"></script>
- <script>
- document.getElementById("span").addEventListener("click", function () {
- const btn = document.getElementById("bottone_con_stato");
- if (btn.getAttribute("disabled") === null)
- btn.setAttribute("disabled", "disabled");
- else
- btn.removeAttribute("disabled");
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement