基本的なレイアウト:
<textarea id="courseText"></textarea>
<ul class="chapter-items">
<li id="chap1link">Chapter 1</li>
<input id="chap1value" type="hidden" value="I am he as you are he as you are me and we are all together" />
<li id="chap2link">Chapter 2</li>
<input id="chap2value" type="hidden" value="See how they run like pigs from a gun, see how they fly" />
<li id="chap3link">Chapter 3</li>
<input id="chap3value" type="hidden" value="I'm crying" />
</ul>
対応する非表示フィールドの値でliがクリックされるたびに、textareacourseTextを更新することは可能ですか?
chap1link liをクリックすると、chap1valueの値がテキストエリアに読み込まれます。
アドバイスをいただければ幸いです。ありがとう!