getElementById Method not working
var target = document.getElementById("berenger");
the html file looks like:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<title>The Running Man</title>
content="text/html; charset=utf-8" />
<p>In this cinema materpiece,
<a id="berenger" href="/name/nm0000297/">Tom Berenger</a> plays
a US soldier working in the Panamanian jungle.</p>
It didn't even return a null value. Please help.