我有一个text和一个button做一个搜索,要的效果是 按一下这个button onclick事件,跳转到XXX_text的值.html页面
我该怎么做?因为我完全不懂js所以求助一下。。对了 不要弹出新页面

解决方案 »

  1.   

    在页面写一个IFRAME,提交到IFRAME里面就可以了
    document.forms[0].target = "IFRAME_NAME";
    document.forms[0].action = action;
    document.forms[0].submit();
      

  2.   

     window.location.href="xxx_" + document.getElementById("TEXTID").value+".html"
      

  3.   


    //button加如下事件
    OnClientClick="GotoURL()" 
    //js函数如下
        function GotoURL()
        {
            
            var=url+document.getElementById('tbURL').value;
            window.open(url)
        }
        
      

  4.   


      function goUrl()
      {   var url = document.getElementById("textValue").value+".html";
       window.location.href= url ;
      }
      

  5.   

      function GoGoGo()
        {
            window.location.href=document.getElementById("textValue").value+".html";
         }
      

  6.   

    若打开新窗口就用window.open(),否则就用window.location.href
      

  7.   

    写一个onclick()事件来调用你所需的代码.
      

  8.   


    <input type="text" name="aa"></input>
    <input type="button" name="bb" onclick="window.location.href='xxx_' + document.all.aa.value+'.html'"></input>