0
我有這個代碼,其中有幾個單選按鈕和一個輸入框。我已經捕獲了輸入框的值,並將其作爲按鈕的按鈕單擊按鈕添加到URL中。但我也需要捕獲所選無線電的值,並將其作爲查詢字符串傳遞給網址。它應該看起來像:http://mysite.com/events/SitePages/test1.aspx?kwd=InputBoxvalue&type=RadioValue捕獲無線電數值並追加到查詢字符串URL
我該怎麼做?
All<input name="EventRadio" type="radio" value="All"/>
Events<input name="EventRadio" type="radio" value="Events"/>
Classes<input name="EventRadio" type="radio" value="Classes"/>
<input name="keyword" type="text" id="EventSearchBox"/>
<input name="SearchButton" type="button" value="Search"
onClick="location.href='http://mysite.com/events/SitePages/test1.aspx?kwd='+ document.getElementById('EventSearchBox').value; return false;"/><br/><br/>
是jQuery的標籤真的需要? – 2011-12-30 18:36:58