Changeset 318 for trunk/style
- Timestamp:
- Feb 4, 2010, 8:06:47 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/style/global.js
r293 r318 48 48 return is_confirmed; 49 49 } 50 51 onload = function() 52 { 53 if (document.getElementsByClassName == undefined) 54 { 55 document.getElementsByClassName = function(className) 56 { 57 var hasClassName = new RegExp("(?:^|\\s)" + className + "(?:$|\\s)"); 58 var allElements = document.getElementsByTagName("*"); 59 var results = []; 60 61 var element; 62 for (var i = 0; (element = allElements[i]) != null; i++) 63 { 64 var elementClass = element.className; 65 if (elementClass && elementClass.indexOf(className) != -1 && hasClassName.test(elementClass)) 66 results.push(element); 67 } 68 return results; 69 } 70 } 71 72 arr = document.getElementsByClassName('textedit'); 73 for(i = 0; i < arr.length; i++) 74 { 75 ResizeTextArea(arr[i]); 76 } 77 } 78 79 function CheckAllCheckbox() 80 { 81 ch = document.getElementById('CheckAll'); 82 arr = document.getElementsByClassName('CheckBox'); 83 for(i = 0; i < arr.length; i++) 84 { 85 arr[i].checked = ch.checked; 86 } 87 return(false); 88 }
Note:
See TracChangeset
for help on using the changeset viewer.