扫码关注官方订阅号
我的代码如下:
Any 0 1 2
如何让selected的选项设置为value等于$scope.testV的项呢?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
在controller加入这句$scope.testV = 2;就能默认显示2了。
$scope.testV = 2;
$scope.change = function(){ console.log($scope.testV); }
这样,每次改变select值,控制台都会输出改变后的值。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
在controller加入这句
$scope.testV = 2;就能默认显示2了。这样,每次改变select值,控制台都会输出改变后的值。