javascript - How to get values of dropdown -


here html

<select class="height_selected">       <option>select height</option>       <option ng-model="userheight" ng-init="1" value="1">123 cm</option>       <option ng-model="userheight" ng-init="2" value="2">125 cm</option>       <option ng-model="userheight" ng-init="3" value="3">124 cm</option> </select>   <a type="button" ng-click="updateheight()">save</a></div> 

in controller

userheight = $scope.userheight;

but not getting value.

how can value ?

you wrongly used ng-model options. it used inputs fields input box, textarea, select

for more reference

it comes

<select class="height_selected" ng-model="userheight">       <option>select height</option>       <option  value="1">123 cm</option>       <option  value="2">125 cm</option>       <option  value="3">124 cm</option> </select> 

now value


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -