我有这个代码:
<form>
<input type="text" placeholder="Enter something..." id="box">
<button onclick="window.open('http://example.com/' + document.getElementById('box').value);">GO
</button>
</form>
当用户输入一个单词并单击“GO”时,他会转到一个 url+ 输入的值。使用此代码,页面在新窗口中打开,但我想在同一框架中打开它。我该怎么做?