RT

解决方案 »

  1.   


    <button id="test">test</button>
    <div style="display:none; width:100px;height:100px; border:1px solid red;" id="div">
    <script>
    function $(o){return document.getElementById(o)}
    $('test').onclick = function(){
    var bool = confirm('显示div吗?');
    if(bool){
    $('div').style.display = 'block'
    }
    }
    </script>
    楼主 这个意思?
      

  2.   

    跳转到Div是神马意思
    var a = window.confirm("是否要让我跳转")
    if(a){
      //跳转
    }else{
      
    }
      

  3.   

    <DIV id=u177_rtf><span style=" font-family:'\'cb\'ce\'cc\'e5'; color:#FFFFFF; font-size:13px;"><b>测试1</b></span></DIV>
    <INPUT id=u997  type=button value="办理"><DIV id=u177_rtf><span style=" font-family:'\'cb\'ce\'cc\'e5'; color:#FFFFFF; font-size:13px;"><b>测试2</b></span></DIV>两个div  测试2刚刚开始是禁用的,就是不能点的(这个功能没实现,也希望各位帮忙解决一下),在测试1中填完了表格(上面的代码省略了表格),点击办理  跳到测试2去  但这时候 测试1中的办理将要隐藏掉。
    不知意思是否表达清楚。刚刚吃饭去了 不好意思
      

  4.   

    那也不叫跳转啊 除非你这个过程是Ajax的
    你这个顶多叫focus到测试2中 呵呵
      

  5.   

    额、那也行。 
    我以为function(){...}就可以了。
      

  6.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <style>
    #div{
      position:absolute;
      top:600px
      }
    </style>
    </head>
    <body>
    <input type="button" id="test" value="跳转"/>
    <div id="div">
    <p>
    吉姆·亨森1936年出生于美国密西西比州,他自小喜欢绘画,尤其爱画卡通人物,十多岁时爱上由腹语大师埃德加·伯根主持的电台节目,同时也开始热爱木偶剧,觉得两者同样以说话古灵精怪做卖点,十分有趣。谷歌logo纪念吉姆·亨森·芝麻街由6个卡通组成,下面有6个按钮,你可以点击随意一个按钮,对应的卡通人物就会动起了,正好6个卡通与按钮与google6个字母相呼应。Google Doodle会纪念一些伟大的人物,如C元素发现者阿尔伯特·森特·哲尔吉、雕塑大师亚历山大·考尔德等,吉姆·亨森也是google doodle值得纪念的人。
    </p>
    </div>
    <script>
        document.getElementById('test').onclick = function(){
            var bool = confirm('确定跳转吗?');
            if(bool){
               document.getElementById('div').scrollIntoView();
            }
        }
    </script>
    </body>
    </html>
      

  7.   


    scrollIntoView 这个是什么意思? 貌似不行。
      

  8.   

    <DIV id=u177_rtf><span style=" font-family:'\'cb\'ce\'cc\'e5'; color:#FFFFFF; font-size:13px;background:#0f6;"><b>测试1</b></span></DIV>
    <INPUT id=u997 type=button value="办理" onclick="ss()"><DIV id=u178_rtf style="display:none"><span style=" font-family:'\'cb\'ce\'cc\'e5'; color:#FFFFFF; font-size:13px;background:#066;"><b>测试2</b></span></DIV>
    <script>
    function ss(){
    var s=document.getElementById("u177_rtf");
    s.style.display="none";
    document.getElementById("u997").style.display="none";
    document.getElementById("u178_rtf").style.display="block";
    document.getElementById("u178_rtf").focus();
    }
    </script>
    隐藏和显示,不知道能不能满足lz的要求?