Home > Web Front-end > HTML Tutorial > UL assignment problem_html/css_WEB-ITnose

UL assignment problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:19
Original
1310 people have browsed it


                                                                1" >
                                       ;img src="images/bar2.png" alt="" />
="images/bar3.png" alt="" />
                                                                      🎜>
I use document.getElementById("ad").style.marginLeft=cf "px"; to assign value to DIV.
I now want to assign a value to ul under the ID ad.
document.getElementById("adul").getElementsByTagName("ul").style.marginLeft=cf "px";
But it doesn't work. How do I assign a value to this UL?





Reply to discussion (solution)

document.getElementById("adul").getElementsByTagName("ul") [0].style .marginLeft=cf "px";
$("#ad>ul").animate({marginLeft: '20px'}, "slow");

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template