且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

根据表单输入将用户重定向到目录

更新时间:2023-01-14 12:32:19

使用JavaScript非常简单,这是一个有效的示例:

Pretty simple with JavaScript, here's a working example:

<form onsubmit="location.href='http://www.mysite.com/' + document.getElementById('myInput').value; return false;">
  <input type="text" id="myInput" />
  <input type="submit" />
</form>