hello! In my own code, when I use a link, it opens a external site in a new tab, and I would like to change the title of this external site. it is: <a href ='http://www.google.es' target='_blank'> Link </a> PHP: Well, does it exist any javascript function that does what I want? Thanks!
You have to edit the external site code and change the title of it. I think there is no code to change it from other code if you have no permission to edit just the file.
you can change it by setting a title attribute like <a id="mylink" href ='http://www.google.es' target='_blank'> Link </a> ... document.getElementById("mylink").setAttribute("title", "click here to visit google.es!"); Code (javascript): if you don't have access to the source (i.e. external js included), then you can consider traversing the dom from the link's first parent you can easily reference, for example, for: <div id="menu"> <a href=""> some link </a> <a href="http://google.es">google</a></div> -> document.getElementById("menu").getElementsByTagName("a")[1] will target the google link directly. but it won't hold any SEO value so better do as rubben has suggested.