我有一个SharePoint:dvdropdownlist下拉列表,它从列表中提取选项,然后在用户提交后回写这些更改。但是,根据下拉列表的值,我们希望能够隐藏或显示某些字段。
尝试使用jquery,但收效甚微。
<SCRIPT type=text/javascript>
$(document).ready(function($) {
var selected = $("#SharePoint:dvdropdownlist option:selected").text();
if (selected == 'Other')
{
$("#OtherReason").hide();
}
});
</SCRIPT>
你的想法?