我的网站有一段带有 madlib 风格的段落,要求用户选择不同的内联下拉选项来完成该段落。
我的 HTML
<div id="aspirate">
BONE MARROW ASPIRATE AND TOUCH PREPARATION: The aspirate smears contain
<select name=asp_1>
<option> few </option>
<option> adequate </option>
<option> numerous </option>
</select>
<select name=asp_2>
<option> cellular </option>
<option> paucicellular </option>
<option> acellular </option>
</select>
marrow particles. Myeloid precursors appear
<select name=asp_3>
<option> adequate </option>
<option> decreased </option>
<option> increased </option>
</select>
in number with
<select name=asp_4>
<option> full-spectrum maturation </option>
<option> left-shifted maturation </option>
</select>. Erythroid precursors appear
<select name=asp_5>
<option> adequate </option>
<option> decreased </option>
<option> increased </option>
</select> in number with full-spectrum maturation <select name=asp_6>
<option> and mild megaloblastic changes </option>
<option> and mild dyspoies characterized by nuclear membrane irregularities and increased mitoses </option>
<option> and occasional binucleate forms </option>
</select>.
Megakaryocytes are
<select name=asp_7>
<option> adequate </option>
<option> decreased </option>
<option> increased </option>
</select> in number and normal in morphology. No dysplastic changes or increased numbers of blast cells are identified. No lymphoid infiltrates are identified.
<select name=asp_9>
<option> </option>
<option> The direct smears and touch preparation slides show similar cellular composition. </option>
<option> The direct smear slides show similar cellular composition.</option>
</select> The iron stain shows
<select name=asp_10>
<option> </option>
<option> no ring sideroblasts, and </option>
<option> rare ring sideroblasts, and </option>
</select>
<select name=asp_11>
<option> adequate storage iron</option>
<option> decreased storage iron </option>
<option> increased storage iron </option>
</select>.
</div>
<br>
<input id="submit" type="button" value="Submit" onClick='document.getElementById("outPut4").innerHTML=document.getElementById("aspirate").innerText'>
<br>
<form>
<textarea id="outPut4" rows = 20 cols = 45></textarea>
</form>
这仅返回文本减去下拉选择?这可以仅使用 HTML 来完成,还是应该为每个下拉列表分配一个变量值并使用 javascript 调用一个函数,该函数将在 textarea 中写入我的文本?