站内搜索: 请输入搜索关键词

当前页面: 开发资料首页Javascript 专题一个改变最后选中datagrid的Color的javascript

一个改变最后选中datagrid的Color的javascript

摘要: 一个改变最后选中datagrid的Color的javascript
<textarea readonly style="border:none;font-family:Courier New;line-height:150%;width:760px;overflow-y:visible">

var Supplier_LastSelectRowId = "";

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 Supplier_GetParentElementByTagName(element, tagName) { var element=element; while(element.tagName != tagName) element = element.parentNode; return element; }


</textarea>
↑返回目录
前一篇: 我在CSDN回答的ASP和Javascript问题集锦
后一篇: 使用javascript以键值对的方式读取查询字符串【QueryString】