get url and title

version1

javascript:document.write("<div>"+window.document.title+"<br><a href='"+window.document.location.toString()+"' target='_blank'>"+window.document.location.toString()+"</a></div>");

version 2

javascript:document.getElementsByTagName("body")[0].innerHTML="<div>"+window.document.title+"<br><a href='"+window.document.location.toString()+"' target='_blank'>"+window.document.location.toString()+"</a></div>";