问题:
在设置下拉菜单初始值时,显示为空白,而不是我们设定的初始值。如下:
<select name="exam_type" class="form-control" ng-model="topic.exam_type" onchang="changetype()" >
<option value="0" selected>高考</option>
<option value="1">成考</option>
<option value="2">研考</option>
</select>
解决方法:
在js中设置topic.exam_type的初始值,如下:
$scope.topic.exam_type = '0';
网友评论