html 我写了个菜单,然后菜单里有button 、label,但是他们的位置不正确,麻烦帮忙看下
窗体1 script>
$(function () {
var name = "";
$("#menu ul li a").each(function () {
$(this).click(function () {
name = $(this).attr("title");
$("#div2 div").each(function () {
$(this).attr("style", "background-color:" + name + ";display:none;");
if ($(this).attr("id") == name) {
$(this).attr("style", "background-color:" + name + ";");
}
})
});
});
});
script>
页面1 页面2 回复讨论(解决方案)
具体怎么样才正确。
你看 button 与edit在一个层内,应该按照各自的left,top 进行定位,但是现在它都在一起,也就是left、top没起作用。
还是不对。。
下载本文