Simple JavaScript search box

后端 未结 3 1410
走了就别回头了
走了就别回头了 2021-02-10 14:49

I tried connecting the first text box, so it would turn it into a URL, and then when \'search\' is clicked, it would jump to that website, not sure if it\'s impossible, or i\'m

3条回答
  •  故里飘歌
    2021-02-10 15:30

    Here's how I would do it:

     
     
    

    Of course you could do this:

     
    
     onclick="func();"
    

    Or document.getElementById("search-button").onclick = function(){ window.location = document.getElementById('link-box').value;
    };

    Or last of all

     
    

提交回复
热议问题