A change in Color for the last selected DataGrid, JavaScript

xiaoxiao2021-03-06  142

VAR support = ""

Function Supplier_SelectRow (Sender)

{If (Supplier_LastSelectRowId = "!") {Var lastSelectRow = window.document.getElementById (Supplier_LastSelectRowId); if (lastSelectRow = null!) {LastSelectRow.runtimeStyle.backgroundColor = "";}} var selectRow = Supplier_GetParentElementByTagName (sender, "TR "); //window.document.getElementById(sender.id);! if (selectRow = null) {selectRow.runtimeStyle.backgroundColor =" # CAD3E4 "; Supplier_LastSelectRowId = selectRow.id; //sender.id; // SupplierName .innerhtml = sender.innerhtml;}}

Function supportBytagname (element, tagname) {var element = element; while (element.tagname! = tagname) Element = element.parentNode; return element;}

转载请注明原文地址:https://www.9cbs.com/read-127460.html

New Post(0)