http://blog.9cbs.net/bgu/
JS file source: gridColorControl.js ===================================== / * ---- ------------- Call Description ----------------- Description: Can be used to set up page events. Entrance function: onfocusset (...), onfocusset, "# ffffff", "# ffffff", "# 000000")
Practical Call: OnMouseOver = 'onfocusset ("# 000000", "# ffffff", "# ffffff", "# 000000")' Click Event: Onclick = 'onfocusset ("# 000000", "# ffffffff "," # Fffffff "," # 000000 ") '
Parameter Description: Parameter 1 [Color]: Unchecked Font Color Parameters 2 [BackColor]: The background color parameter of the unselected 3 [SelectColor]: Select the font color parameter 4 [SelectbackColor]: Select Background color ----------------------------------------- * / var rows = New array (); var shiftstartrow = ""; var setcolor, setbackcolor, setselectcolor, setselectbackcolor;
/ * --------- Main function portrait --------- * / function onfocusset (color, backcolor, selectcolor, selectbackcolor) {setColor = color; setbackcolor = backcolor; setselectcolor = selectcolor; SetSelectBackColor = SELECTBACKCOLOR; set ();}
// ----------- Operation --------------- Function set () {irow = window.event.srcelement; do {irow = irow.parentelement ;} While (irow.tagname! = 'Tr') {var j = -1; for (i = 0; i // ------------ color change ------------ Function ChangeColor (OBJ) {for (VAR i = 1; i