此代码中的脚本应创建一个href链接,但不会:
<script>
document.getElementById('linkid').href='www.wikipedia.org';
</script>
<!DOCTYPE html>
<html>
<head>
<title>Href test</title>
</head>
<body>
<h1>Href test</h1>
<a id='linkid'>Link for wikipedia</a>
<table>
</body>
</html>