This works for me:
function onEdit(e) {
var row = e.range.getRow();
e.source.getActiveSheet().getRange(row,4).setValue(new Date());
}
And what is does is that if I type into any cell, the code inserts today's date in column D of the same row.
Is that what you want it to do?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…