document.getElementById('num1').innerHTML = homestead[0].textContent;
document.getElementById('num3').innerHTML = homestead[1].textContent;
}
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<table width="500" border="0">
<tr>
<td><b>Stream Name:</b></td>
<td><b>Viewers&开发者_JAVA百科lt;/b></td>
</tr>
<tr>
<td id="num1"> </td>
<td id="num2"> </td>
homestead is a node value from an xml sheet, and the script put it in the table .. i want to write a script to call the url (another node from xml) and use it as a link for homestead. any suggestions?
I'm pretty confused as to what you're asking, but if you're just talking about adding a link to the table, you need to use an <a href="[url]">
tag:
document.getElementById('num1').innerHTML =
'<a href="' + homestead[0].textContent + '">Link</a>';
精彩评论