编程
您现在的位置:首页 >> 编程

点击查看详细内容的代码

<SCRIPT>

    function changeEngine(obj){

        var engine = document.getElementById("showline_" + obj).style.display;

        if (engine == "none") {

            document.getElementById("showline_" + obj).style.display = "";

            document.getElementById("showtype_" + obj).innerHTML = "关闭详细";

        }

        else {

            document.getElementById("showline_" + obj).style.display = "none";

            document.getElementById("showtype_" + obj).innerHTML = "查看详细";

            

        }

    }

</SCRIPT>

<DIV>

<A onclick=changeEngine(1); href="javascript:void(0);">

<DIV id=showtype_1>查看详细</DIV>

</A>

<DIV style="DISPLAY: none" id=showline_1>

<DIV>123</DIV>

</DIV>