我已经成功地解析了数据并从中创建了表行。我现在试图使用以下代码将.onclick侦听器添加到这些行: for (var i in jsonResultscusnum=' + currRow['cusnum']; var currCell = tableRow.insertCell(0);
currCell.innerHTML我遇到的问题是,所有的行都以监听器
我有以下js代码: var charDiv = document.getElementById("characterList"); // reference to "characterList" div charDiv.appendChild(header); // adds the <p> tag to the parent