Skip to content

Do not use iframe for whole button #156

Open

Description

@techboyg5

Instead, use img with a inside on native document. iframes should be used only for count.

Activity

  1. AadiSharma49 commented on Sep 25, 2024

    @AadiSharma49

    I just create an example using HTML,CSS,JS to not use iframe

    <title>Button without iframe</title>

    Click Me

    <script src="script.js"></script>
  2. AadiSharma49 commented on Sep 25, 2024

    @AadiSharma49

    #myButton {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 8px;
    }

    #myButton:hover {
    background-color: #45a049;
    }

  3. AadiSharma49 commented on Sep 25, 2024

    @AadiSharma49

    // Adding a click event listener to the button
    document.getElementById("myButton").addEventListener("click", function() {
    alert("Button clicked!");
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions