Answers for "javascript dom icon"

2

change favicon with javascript

(function() {
    var link = document.querySelector("link[rel*='icon']") || document.createElement('link');
    link.type = 'image/x-icon';
    link.rel = 'shortcut icon';
    link.href = 'http://www.stackoverflow.com/favicon.ico';
    document.getElementsByTagName('head')[0].appendChild(link);
})();
Posted by: Guest on October-19-2020
-1

how to add an icon to your html website

<link rel="shortcut icon" href="http://sstatic.net/stackoverflow/img/favicon.ico">
Posted by: Guest on November-21-2020

Browse Popular Code Answers by Language