主题:[原创]document.activeElement.parentElement
var theElement=document.activeElement.parentElement;
//将选中的行变为绿色
if(theElement.tagName =="TR" && theElement.id =="LINE"){
theElement.bgColor="#00ff00";
courseno = theElement.cells(0).innerText;
coursename = theElement.cells(1).innerText;
teacherno = theElement.cells(2).innerText;
teachername = theElement.cells(3).innerText;
school = theElement.cells(4).innerText;
type_name = theElement.cells(5).innerText;
rel_id = theElement.cells(6).innerText;
请人解释一下,theElement.cells(0).innerText如何取得标记间的内容。
//将选中的行变为绿色
if(theElement.tagName =="TR" && theElement.id =="LINE"){
theElement.bgColor="#00ff00";
courseno = theElement.cells(0).innerText;
coursename = theElement.cells(1).innerText;
teacherno = theElement.cells(2).innerText;
teachername = theElement.cells(3).innerText;
school = theElement.cells(4).innerText;
type_name = theElement.cells(5).innerText;
rel_id = theElement.cells(6).innerText;
请人解释一下,theElement.cells(0).innerText如何取得标记间的内容。