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 uls = (document.getElementById('toc').getElementsByTagName('ul'))[0].getElementsByTagName('ul'); | var uls = (document.getElementById('toc').getElementsByTagName('ul'))[0].getElementsByTagName('ul'); | ||
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:28, October 6, 2012
var uls = (document.getElementById('toc').getElementsByTagName('ul'))[0].getElementsByTagName('ul'); alert(uls[0].clientWidth); for(var i=0; var len=uls.length; i<len; ++i) { alert(uls[i].clientWidth); }