如何顯示錶單文本框中單選按鈕的值?當單擊單選按鈕時,我希望它改變。使用HTML/Javascript顯示錶單文本框中單選按鈕的值
這裏是我的單選按鈕:
<input type="radio" name="testPassed" id="TestPassed" value="TestPassed">
<input type="radio" name="testFailed" id="TestFailed" value="TestFailed">
文本框:
<textarea name="description" cols="50" rows="5" id="description">Test Status: radioButtonValueHere </textarea>
非常感謝
問題的格式看起來很混亂。 – ndim 2009-11-23 14:33:07
設置name屬性相同,這樣控件可以是單選按鈕:name =「testResults」。 – artdanil 2009-11-23 15:02:06
我認爲@artdanil試圖說的是,您應該使用'name'屬性來適當地分組您的單選按鈕。閱讀以下教程以獲取更多信息:http://www.echoecho.com/htmlforms10.htm – 2009-11-23 15:41:08