ı want to create a button with link but it does not work can you help me
thats my code :var btn= document.createElement("button");btn.innerText="yeni tuş";document.body.appendChild(btn);
ı try create div and add href into it but did not work
var dv= document.createElement("div");dv.innerHTML = " <button>new</button> " dv.style.color = 'red'; dv.setAttribute('href', 'www.google.com'); document.body.appendChild(dv);