event.srcElement+表格应用_javascript技巧: function changeto(highlightcolor){ source=event.srcElement if (source.tagName==TRsource.tagName==TABLE) return while(source.tagName!=TD) source=source.parentElement if (source.style.backgroundColor!=highlightcolor&&source.id!=igno
导读event.srcElement+表格应用_javascript技巧: function changeto(highlightcolor){ source=event.srcElement if (source.tagName==TRsource.tagName==TABLE) return while(source.tagName!=TD) source=source.parentElement if (source.style.backgroundColor!=highlightcolor&&source.id!=igno
function changeto(highlightcolor){ source=event.srcElement if (source.tagName=="TR"||source.tagName=="TABLE") return while(source.tagName!="TD") source=source.parentElement if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore") source.style.backgroundColor=highlightcolor }
function changeback(originalcolor){ if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore") return if (event.toElement!=source) source.style.backgroundColor=originalcolor } script>
event.srcElement+表格应用_javascript技巧
event.srcElement+表格应用_javascript技巧: function changeto(highlightcolor){ source=event.srcElement if (source.tagName==TRsource.tagName==TABLE) return while(source.tagName!=TD) source=source.parentElement if (source.style.backgroundColor!=highlightcolor&&source.id!=igno