js獲取樣式
var display = this.currentStyle? this.currentStyle.display: window.getComputedStyle(this, null).display;
老師能不能解釋下這句話?
var display = this.style.display不行嗎?
var display = this.currentStyle? this.currentStyle.display: window.getComputedStyle(this, null).display;
老師能不能解釋下這句話?
var display = this.style.display不行嗎?
2015-08-03
舉報(bào)
2015-08-03
這是一個(gè)if else 簡寫?
主要是為了兼容IE
this.style.display不能獲取外部CSS樣式