Hola a todos, voy directo al punto.
Tengo varios items, cada uno en un span y con onclick, al hacerle click quiero que se muestre en una <td> , funciona bien , el problema es que al hacerle click a un item se vé bien pero cuando le hago click a otro item , el anterior se borra.
Como hago pa que se vallan mostrando uno debajo del otro, sin que se borren???
Código Javascript
:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<script language="javascript">
function MostrarPlatos(una){
window.document.getElementById("aaa").innerHTML=una;
}
</script>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="aaa"> </td>
</tr>
</table>
<span id="span1" onclick="MostrarPlatos(1)" style="cursor:pointer">LINK1 </span><br />
<span id="span1" onclick="MostrarPlatos(2)" style="cursor:pointer">LINK2 </span><br />
<span id="span1" onclick="MostrarPlatos(3)" style="cursor:pointer">LINK3 </span><br />
<span id="span1" onclick="MostrarPlatos(4)" style="cursor:pointer">LINK4 </span><br />
<span id="span1" onclick="MostrarPlatos(5)" style="cursor:pointer">LINK5 </span>
</body>
</html>