该代码用于验证图像或单元格选择。我的问题是什么是 !== 在以下函数中使用:
function checkSelected() {
var cellList,
selectedCell,
imgList,
selectedImg,
i
cellList = document.getElementById("imgTable")
cellList = cellList.getElementsByTagName("td")
imgList = document.getElementById("b_list")
imgList = imgList.getElementsByTagName("img")
if (cellList[0].style.border.indexOf("7px outset") !== -1) { selectedCell = cellList[0] }
if (selectedCell === undefined || selectedImg === undefined) { return }
selectedCell.style.backgroundImage = "url(" + selectedImg.src + ")"
selectedCell.firstChild.style.visibility = "hidden"
selectedCell.style.border = "1px solid"
selectedImg.style.border = "1px solid"
}