我试图将所有插件输出到浏览器。
但是我在这行之后收到了 acUncaught SyntaxError: Unexpected token
异常:
document.write(<tr><td>);
我错过了一些东西,但是什么?
代码:
<html>
<head>
<title>List of Plug-Ins</title>
</head>
<body>
<h1>List of Plug-Ins</h1>
<hr>
The following is a list of the plug-ins installed in this
copy of Netscape, generated using the JavaScript
navigator.plugins object:
<hr>
<table border>
<tr>
<th>Plug-in Name</th>
<th>Filename</th>
<th>Description</th>
</tr>
<script>
for(i=0; i < navigator.plugins.length; i++) {
document.write(<tr><td>);
document.write(navigator.plugins[i].name);
document.write(</td><td>);
document.write(navigator.plugins[i].filename);
document.write(</td><td>);
document.write(navigator.plugins[i].description);
document.write(</td></td>);
}
</script>
</table>
</body>
</html>
我该如何解决这个问题?