Change the link by manipulating the DOM

I’m back with a problem I posted about 2 days ago. Looks like I wasn’t too explicit.

In a DOM html document, in the container, in the body I have a paragraph that refers to a certain site (ex Wikipedia).

I want to make a script for this paragraph that change the reference in Wikipedia’s “science” hyperlink to a Google search for science images.

The idea is that must change the link by manipulating the DOM.

Many programmers are lovers of science

			var Title = document.getElementById('master');
			document.getElementById("demo").innerHTML = Title;
			var Change = " <a href="" target="_blank">science</a>";
			eTitel.innerHTML = eTitle;

The above script, which I conceived, does not seem to be the optimal solution.
Can anyone help me with a script appropriate to the requirement?

		<p id="master">
			Many programmers are lovers of
			<a href="">science</a>
			var eTitle = document.getElementById('master');
			document.getElementById("demo").innerHTML = eTitle;
			var sChange = " <a href="" target="_blank">science</a>";
			eTitel.innerHTML = eTitle;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.