我遵循 html 结构:
<div id="options">
<input type="radio" id="option0" value="option0" checked='checked' /><label>All</label>
<input type="radio" id="option1" value="option1" /><label>Option 1</label>
<input type="radio" id="option2" value="option2" /><label>Option 2</label>
<input type="radio" id="option3" value="option3" /><label>Option 3</label>
</div>
<p id="sentence1">This is an example of sentence 1</p>
<p id="sentence2">This is an example of sentence 2</p>
<p id="sentence3">This is an example of sentence 3</p>
我想在选中“All”选项时显示所有句子,并在选中“Option 1”时显示#sentence1 ..等等。
任何帮助,将不胜感激。
谢谢!里夫基