User:Locke/common.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
var | var topul = document.getElementById('toc').getElementsByTagName('ul'); | ||
var uls = topul[0].getElementsByTagName('ul'); | |||
alert(uls[0].clientWidth); | alert(uls[0].clientWidth); | ||
for(var i=0; var len=uls.length; i<len; ++i) { | for(var i=0; var len=uls.length; i<len; ++i) { | ||
alert(uls[i].clientWidth); | alert(uls[i].clientWidth); | ||
} | } |
Revision as of 04:29, October 6, 2012
var topul = document.getElementById('toc').getElementsByTagName('ul'); var uls = topul[0].getElementsByTagName('ul'); alert(uls[0].clientWidth); for(var i=0; var len=uls.length; i<len; ++i) { alert(uls[i].clientWidth); }