<html>
<head>
<title>Test event 1</title>
</head>
<script language=javascript>
function myfunction() {
alert('Test')
}
function createTable() {
var strTable = '<div align="center"><table id="Edtable" border="1">';
for (i = 1; i < 3; i++) {
strTable += "<tr>";
for (j=1; j<3; j++) {
strTable += '<td id= "' +i + '-' + j + '" ';
strTable += 'onclick ="myfunction();">';
strTable += " id" +i + '-' + j+"</td>";
}
strTable += "</tr>";
}
strTable += "</table></div>";
document.body.innerHTML = strTable;
}
</script>
<body onload = "createTable()">
</body>
</html>