I am trying to add this line to the url bar of the browser (my browser is Chrome)
javascript:document.getElementsByTagName("head")[0].innerHTML+="<link rel='stylesheet' type='text/css' href='st1.css'>";
When I press enter, the whole page disappears.
When I check the source code, I can see that the JavaScript was executed, but, the whole content disappears, though the content of the body stays the same in the source code !
Why is that happening?
javascript:(function (){}(document.getElementsByTagName("head")[0].innerHTML+="<link rel='stylesheet' type='text/css' href='st1.css'>"));