style="visibility: none"
document.getElementById("typediv1").style.visibility="hidden"//隐藏
document.getElementById("typediv1").style.visibility="visible"//显示
[ h1 ^]\x0d\x0a||\x0d\x0a|div1 |\x0d\x0a||\x0d\x0a\x0d\x0a如图所示:h1是你说贴出的两个图(展开、收起)\x0d\x0adiv1是你要展开后d出的层\x0d\x0a\x0d\x0a$("#h1").click(function () {\x0d\x0a$("#div1").toggle("slow",function () {\x0d\x0aif ($(this).attr("style").toLowerCase().indexOf("none") == -1) {\x0d\x0a$("#imgBasicInfo").attr("src", "../../Images/BarUp.gif")\x0d\x0a}\x0d\x0aelse {\x0d\x0a$("#imgBasicInfo").attr("src", "../../Images/BarOpen.gif")\x0d\x0a}\x0d\x0a})\x0d\x0a})\x0d\x0aimgBasicInfo为你要显示的展开、收起的图片动态欢迎分享,转载请注明来源:内存溢出
评论列表(0条)