2
我有一個像jQuery的發現和可變
var theUrl = 'http://www.google.com/?q=%s';
一個變量,然後我有一個像
<input type="text" id="searchBox" value="" />
一個輸入框,並像
<input type="button" id="searchButton" value="Search" />
當一個按鈕替換文本按鈕被點擊,我應該得到一個提醒,其中%的變種theUrl應替換爲用戶在文本框中輸入的文本
如何做到這一點?我認爲find()函數只會替換html元素!
請幫