javascript - Goto page with textfield value as hash -


ok, should easy me doesn't seem so... because i'm close deadline , have lot do.

this i'm trying do; have html form textfield , button - whenever button clicked or enter pressed goto particular page text field's value on end hash.

for instance; user enters "test" , presses enter or hits button , page goes "google.com#test"

<html> <head>   <script type="text/javascript">     function do_it() {       var hash = document.getelementbyid("hash_input").value;       window.location = "http://google.com#"+hash;     }   </script> </head> <body>  <input id="hash_input" type="text"></input> <input type="button" onclick="do_it()" value="go"></input>  </body> </html> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -