日斋
日新月异

function fn_showTree(btn) {//显示树
            var txt = $("#textName");
            var x = txt.offset().left;
            var y = txt.offset().top;
            if (document.getElementById('treeShowType').value == "" || document.getElementById('treeShowType').value == "false") {
                var tree = $("#treeNode");
                tree.css("position", "absolute"); //绝对定位
                tree.css("left", x);
                tree.css("top", y + 22);
                tree.css("display", "block");
                tree.css("z-index", "2000");

                document.getElementById('treeShowType').value = "true";
            }
            else {
                var tree = $("#treeNode");
                tree.css("display", "none");
                document.getElementById('treeShowType').value = "false";
            }
        }

        function fn_hiddenTree() { //隐藏树
            var tree = $("#treeNode");
            tree.css("display", "none");
            document.getElementById('treeShowType').value = "false";
        }

posted on 2011-04-21 09:39  李承隆  阅读(184)  评论(0编辑  收藏  举报