<script type="text/javascript">
<!--
function show(id){
document.getElementById(id).style.display='';
hideExcept(id);
}
function hide(id){
document.getElementById(id).style.display='none';
}
function hideExcept(id){
spans=document.getElementsByTagName("span");
for (i=0;i<spans.length ;i++ ){
this_span=spans.item(i);
if (this_span.getAttribute("ref")=='page' && this_span.getAttribute("id")!=id) {
hide(this_span.getAttribute("id"));
}
}
}
//-->
</script>
<span id='page1' ref='page'><P>1<IMG src="2006121163859264.jpg" width=400 border=0></P></span>
<span id='page2' ref='page'><P>2<IMG src="2006121163917394.jpg" width=400 border=0></P></span>
<span id='page3' ref='page'><P>3<IMG src="2006121163937271.jpg" width=400 border=0></P></span>
<span id='page4' ref='page'><P>4在要给分的回复后的文本框中填写分数,然后输入自己的密码</P></span>
<script type="text/javascript">
<!--
show('page1')
//-->
</script>
<span onClick=show('page1')><a href='#'>[1]</a>&nbsp;&nbsp;</span>
<span onClick=show('page2')><a href='#'>[2]</a>&nbsp;&nbsp;</span>
<span onClick=show('page3')><a href='#'>[3]</a>&nbsp;&nbsp;</span>
<span onClick=show('page4')><a href='#'>[4]</a>&nbsp;&nbsp;</span>

解决方案 »

  1.   

    <script type="text/javascript">
    <!--
    function show(id)
    {
    document.getElementById(id).style.visibility='visible';
    document.getElementById(id).style.position='static'; ==>这里改为static就OK了
    hideExcept(id);
    }
    function hide(id)
    {
    document.getElementById(id).style.visibility='hidden';
    document.getElementById(id).style.position='absolute';
    }
    function hideExcept(id)
    {
    spans=document.getElementsByTagName("span");
    for (i=0;i<spans.length ;i++ )
    {
    this_span=spans.item(i);
    if (this_span.getAttribute("ref")=='page' && this_span.getAttribute("id")!=id)
    {
    hide(this_span.getAttribute("id"));
    }
    }
    }
    //-->
    </script>
    <span id='page1' ref='page'><P><IMG src="1.gif"></P></span>
    <span id='page2' ref='page'><P><IMG src="2.gif"></P></span>
    <span id='page3' ref='page'><P><IMG src="3.gif"></P></span>
    <span id='page4' ref='page'><P>在要给分的回复后的文本框中填写分数,然后输入自己的密码</P></span>
    <script type="text/javascript">
    <!--
    show('page1')
    //-->
    </script>
    <span onClick=show('page1')><a href='#'>[1]</a>&nbsp;&nbsp;</span>
    <span onClick=show('page2')><a href='#'>[2]</a>&nbsp;&nbsp;</span>
    <span onClick=show('page3')><a href='#'>[3]</a>&nbsp;&nbsp;</span>
    <span onClick=show('page4')><a href='#'>[4]</a>&nbsp;&nbsp;</span>