4 <link rel='icon' href='test.png'
>
5 <script type='text/javascript' language='javascript'
>
6 function removeLinkIfExists() {
7 var docHead
= document
.getElementsByTagName("head")[0];
8 var links
= docHead
.getElementsByTagName("link");
9 for (var i
=0; i
<links
.length
; i
++) {
11 if (link
.type
=="image/x-icon" && link
.rel
=="shortcut icon") {
12 docHead
.removeChild(link
);
13 return; // Assuming only one match at most.
18 function addLink(iconURL
) {
19 var docHead
= document
.getElementsByTagName("head")[0];
20 var link
= document
.createElement("link");
21 link
.type
= "image/x-icon";
22 link
.rel
= "shortcut icon";
25 docHead
.appendChild(link
);
34 <body onload='OnLoad();'
>