首先声明两个变量,然后分别赋值为true和false
var inStock; var shipping; inStock = true; shipping = false; var elStock = document.getElementById('stock'); elStock.className = inStock; var elShip = document.getElementById('shipping'); elShip.className = shipping;
首先声明两个变量,然后分别赋值为true和false
var inStock; var shipping; inStock = true; shipping = false; var elStock = document.getElementById('stock'); elStock.className = inStock; var elShip = document.getElementById('shipping'); elShip.className = shipping;