当我选择单选按钮时没有任何反应。请chk我的jsfiddle并帮助我找到我做错了什么。
var prnt = document.getElementById("prnt");
var app = angular.module('App', []);
app.controller('aCtrl', function($scope) {
$scope.correctAns = function(){
if($scope.chk === "false"){
prnt.innerHTML+="working";
};
};
});
这是我的jsfiddle链接
答案 0 :(得分:0)
这是你想做的吗?
var prnt = document.getElementById("prnt");
var app = angular.module('App', []);
app.controller('aCtrl', function ($scope) {
$scope.chk = {
val: false
};
$scope.check = function () {
if ($scope.chk.val === false) {
prnt.innerHTML = "True";
}
}
});