我有一個輸入字段和一個按鈕。輸入字段在加載時有一個值,但是我想在加載頁面和點擊按鈕後將該值用作新選項卡中的URL來更改該值。我是JavaScript新手,任何輸入都會有所幫助。提前致謝。在新選項卡中打開輸入字段的值。我想實時更改輸入字段的值
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input type="text" id="box" value="http://google.com" width="100%" />
</td>
<td>
<button id="newtab1" value = "Search" style="position: absolute;">New Tab</button>
</td>
</tr>
</table>
如果你表現出什麼樣的代碼,你已經盡力了,我們可以幫你改善。 – freginold
請閱讀[問]。重要短語:「搜索和研究」和「解釋......阻止你自己解決它的任何困難」。 –