Neel
0
Q:

how to create button on button click

<script>
function myFunction() {
  alert("ALERT THIS FUNCTION HAS RUNNED");
}
</script>
<button onclick="myFunction">click to run function</button>
3

object.onclick = function(){myScript};
 
 
0
-------------------------------------------
||| 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);
0

New to Communities?

Join the community