該函數選擇一個數據錶行,並通過一次單擊給出該行的值。如何在dblClick螞蟻事件(evt)上運行selectfunction
如何使這個函數在dslclick上工作,就像singleclick上的evt一樣可行?
有沒有像(evtdblclick)?
var oldRow = null;
x = null;
function marktesttable(evt)
{
var selectedRow = (evt.target || evt.srcElement);
while (selectedRow.tagName != "TR")
selectedRow = selectedRow.parentNode;
if (oldRow)
{
oldRow.style.backgroundColor = "";
oldRow.style.color ="";
if (oldRow == selectedRow)
{
oldRow = null;
document.getElementById('iddemo1').value = null;
x = null;
return true;
}
};
selectedRow.style.backgroundColor = "#006bb6";
selectedRow.style.color ="white";
oldRow = selectedRow;
x = selectedRow.textContent;
document.getElementById('iddemo1').value = x;
fillGespraechsnotiz(x);
}
作品對我來說;-) –