I’m trying to insert the following line of code that would correspond to a button that would go to the right side of the web. For now the code appears above the header or just gives error when trying to view the web.
I inserted the same in index.php between <head> and </ head> but gives no result. What position and what file should I put it?
<head>
language=”JavaScript”type=”text/javascript”> <script createDiv function () {var divg = document.createElement (“div”) var newImg = document.createElement (“img”) var = document.createElement NEWLINK (“a”); divg.setAttribute (“style”, “position: fixed; top: 250px; right: 0px; z-index: 9999;”); newImg.src = newImg.alt = “lasprovincias.es Web Awards”; newLink.href = “http://premiosweb.lasprovincias.es”; divg.appendChild (Newlink); newLink.appendChild (newImg); document.body.appendChild (divg) ;} window.onload = createDiv; </ script>
</ head>
A greeting