When you click table row (student name), the corresponding layer (student information) is displayed. when you click another row, the hidden problem of the original layer is displayed. Click table row (student name) the corresponding layer (student information) is displayed. when other rows are clicked, the original layer is hidden and the corresponding layer is displayed. Problem: The table & lt; tr & gt; has the onclick function to implement the display layer. how to make a table row (student name) that hides the layer when onblur loses focus) the corresponding layer (student information) is displayed, and the hidden problem of the original layer is displayed when other rows are clicked.
Effect: When you click table row (student name), the corresponding layer (student information) is displayed. when you click another row, the original layer is hidden and the corresponding layer is displayed.
Problem: TableWith onclick, the display layer can be implemented. how can I hide the layer when onblur loses focus.
Code:
JavaScript:
JScript code
Function ShowChosen (divID) {divID. style. display = 'block'; div = divID;} function selectRow (rowID) {var tStu = document. getElementById ("tblStudent") for (var I = 0; I
Table:
HTML code
Layer:
HTML code
" style="display:none">
Note: previously, we used single-choice button groups, ShowChosen () for onclick, HideChosen () for onblur, but wanted table effects, and single-choice buttons could not be hidden;
The original idea is that in selectRow (), HideChosen () is used when the row is not vertex, but HideChosen ( ); It cannot be used, and the face value in the brackets.
Thank you very much!
------ Solution --------------------
Why not use jquery?