我有以下用于下拉菜单和输入框的代码:
<select id="ci_binfo_affiliation_type" style="" onblur="updateptcname()" onchange="changecolor()" name="ci_binfo_affiliation_type" class="styled">
<option <? if ($ci_binfo_affiliation_type == "") echo 'selected'; ?> value="">Select</option>
<option <? if ($ci_binfo_affiliation_type == "work") echo 'selected'; ?> value="work">work</option>
<option <? if ($ci_binfo_affiliation_type == "Other") echo 'selected'; ?> value="Other">Other</option>
</select>
<label class="formlbl" for="name_aftd">Name of (affiliation)</label>
<div class="formbitem">
<input id="ci_binfo_affiliation_name" type="text" onchange="updateptcname()" name="ci_binfo_affiliation_name" value="<?=$ci_binfo_affiliation_name?>" class="inputtext2" />
</div>
我想要发生的是:如果用户在下拉菜单中选择“学校”,那么在“(附属机构)名称”标签中必须更改为学校名称“。
任何人都可以帮助我,我该怎么做...