I'm just getting back in to Javascript, and find the following code works fine in IE, but not in FF. For my edification, could someone please explain why?
Thanks!
Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Column Content</title>
<script language="javascript">
function meClick(id){
alert(document.getElementById(id).innerText);
}
</script>
</head>
<body>
<table width="37%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="30%" id = "c1" onClick="meClick(this.id)"><div align="center">C1</div></td>
<td width="22%" id = "c2" onClick="meClick(this.id)"><div align="center">C2</div></td>
<td width="48%" id = "c3" onClick="meClick(this.id)"><div align="center">C3</div></td>
</tr>
</table>
</body>
</html>
Comment