首先声明两个变量,然后分别赋值为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;
标签:classname 声明 变量 类型 log name 赋值 pos ppi
首先声明两个变量,然后分别赋值为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;
标签:classname 声明 变量 类型 log name 赋值 pos ppi
原文地址:https://www.cnblogs.com/max-hou/p/8716480.html