I want to have a user t开发者_JS百科ype something in, such as a "keyword" and have them redirected to a page. But if say someone types in "music" into the form the redirect is different from when someone types in "movies".
I found this: http://www.javascriptkit.com/script/script2/loginpass2.shtml, which redirects based any acceptable input to ONE website... but I need multiple...
Any suggestions?
<input type="text" id="keyword" />
<a href="#" onclick="window.location=document.getElementById('keyword').value+'.html';return false;">Go</a>
Really not sure what functionality you need, but if you type 'movies' in the text box and click go you will be redirected to 'movies.html'.
This isn't particularly useful for many situations so can you provide more details of what you're actually building.
精彩评论