输入banner图图片脚本导航/分类

UL赋值问题_html/css_WEB-ITnose





我用document.getElementById("ad").style.marginLeft=cf+"px";可以给DIV赋值。
我现在想给ID为ad下的ul赋值。
document.getElementById("adul").getElementsByTagName("ul").style.marginLeft=cf+"px";
但不行,请问如何给这UL赋值?


回复讨论(解决方案)

document.getElementById("adul").getElementsByTagName("ul") [0].style.marginLeft=cf+"px";

$("#ad>ul").animate({marginLeft: '20px'}, "slow");

document.getElementById("ad").firstChild.style.marginLeft=cf+"px";