我写的一些JS代码。。。。

        //分类不显示
        //        function Xuanzhong(name, con) {

        //            for (var i = 0; i < con; i++) {
        //                // $("#" + name + i).hide();
        //                var trs = $("tr");
        //                if ("tr_" + name == "tr_1") //等于tr_1
        //                {
        //                    for (var j = 0; j < trs.length; j++) {
        //                        if (trs[j].id != "tr_1" && trs[j].id != "") {
        //                            trs[j].style.display = "none";
        //                            $('#xianshi' + name).hide();
        //                            $('#buxianshi' + name).show();
        //                        }
        //                    }
        //                }
        //                else//不等于tr_1
        //                {
        //                    for (var j = 0; j < trs.length; j++) {
        //                        if (trs[j].id != name + i && trs[j].id != "" && trs[j].id != "tr_1") {
        //                            var num = name.toString() + i.toString();
        //                            $('#xianshi' + name).hide();
        //                            $('#buxianshi' + name).show();
        //                            if (parseInt(num) <=parseInt(trs[j].id)) {
        //                                $("#" + trs[j].id).hide();
        //                                //$('#'+num).hide();
        //                                
        ////                                $('#xianshi' + name).show();
        ////                                $('#buxianshi' + name).hide();

        //                            }
        //                        }
        //                    }
        //                }

        //            }
        //        }
        //        //分类显示
        //        function BuXuanzhong(name, con) {

        //            for (var i = 0; i < con; i++) {
        //                $("#" + name + i).show();
        //                $('#xianshi' + name).show();
        //                $('#buxianshi' + name).hide();
        //            }
        //        }

posted on 2012-08-23 09:53  hehedada  阅读(113)  评论(0编辑  收藏  举报

导航