lyricsInp = document.getElementById("lyrics").value;
var lines = lyricsInp.split("\n");
for (i = 0; i < lines.length; i++) {
holder[0][i] = new Array();
words = lines[i].replace(/[ \t\r]+/g, "###").split("###");
for (j = 0; j < words.length; j++) {
holder[0][i][j].word = words[j];
holder[0][i][j].startT = 0;
holder[0][i][j].endT = 0;
}
}
在这里,我需要每个支架元素保留word,
startT
and endT
,但这不起作用。我该如何做到这一点。