Answers for "how to add function to add button html"

4

How to Create an HTML Button Using the Button Tag in an A Tag

<a href='https://www.freecodecamp.org/'><button>Link To freeCodeCamp</button></a>
Posted by: Guest on April-01-2021
0

how to create button on button click

-------------------------------------------
||| Put it All in a Function Css DOM JS |||
-------------------------------------------

var btn = document.createElement("a");
btn.innerHTML = "Get Account";
btn.style.Color = "blue";
btn.style.padding = "15px 20px";
btn.style.border = "1px solid #ffffff";
btn.style.backgroundColor = "#307cee";
btn.style.borderRadius = "30px";
btn.href = "http://example.com";
btn.style.textDecoration = "none";
btn.style.display = "inline - block";
btn.style.innerHTML = "Underline Removed";
document.body.appendChild(btn);
Posted by: Guest on December-01-2020

Code answers related to "how to add function to add button html"

Browse Popular Code Answers by Language