The code is as follows
var tableElem = ("MyTable");
var tbodyElem = ("tbody")[0];
var trElem = ("tr");
var td1 = ("td");
= "EditCell()";
= "45%";
= " ";
(td1);
(trElem);
alert();
This code dynamically creates a tr and td, and sets an onclick event in td, but the fact is that when td is clicked, the EditCell function is not set off to call the click time. Then = "EditCell()"; changed to ("onclick", EditCell) before successfully calling
var tableElem = ("MyTable");
var tbodyElem = ("tbody")[0];
var trElem = ("tr");
var td1 = ("td");
= "EditCell()";
= "45%";
= " ";
(td1);
(trElem);
alert();
This code dynamically creates a tr and td, and sets an onclick event in td, but the fact is that when td is clicked, the EditCell function is not set off to call the click time. Then = "EditCell()"; changed to ("onclick", EditCell) before successfully calling