this.style.color中的this代表什么对象?
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/11 09:10:14
this.style.color中的this代表什么对象?
Insert title here
body {color:black}
function shijian(){
var li = document.getElementsByTagName("li");//返回的是一个数组
for(var i=0; i
Insert title here
body {color:black}
function shijian(){
var li = document.getElementsByTagName("li");//返回的是一个数组
for(var i=0; i
![this.style.color中的this代表什么对象?](/uploads/image/z/7731267-51-7.jpg?t=this.style.color%E4%B8%AD%E7%9A%84this%E4%BB%A3%E8%A1%A8%E4%BB%80%E4%B9%88%E5%AF%B9%E8%B1%A1%3F)
this 是只本身.
这里应该指的是 整个html 文件你可以这么理解.
因为是主体在运行function
而这个主体有document
然后内部运行许多个function
问题补充:那么可以把this.style.color替换为:li[i].style.color吗?
不行的
你可以把
var li = document.getElementsByTagName("li");
换成
var li = this.document.getElementsByTagName("li");
这样理解了没
this.style.color 修改的是这里的颜色:
body {color:black}
这里应该指的是 整个html 文件你可以这么理解.
因为是主体在运行function
而这个主体有document
然后内部运行许多个function
问题补充:那么可以把this.style.color替换为:li[i].style.color吗?
不行的
你可以把
var li = document.getElementsByTagName("li");
换成
var li = this.document.getElementsByTagName("li");
这样理解了没
this.style.color 修改的是这里的颜色:
body {color:black}
this.style.color中的this代表什么对象?
this.style.behavior是什么意思
what color is this
"this.style.behavior='ur
This is not your style
What color is this apple?
But this color is very
This coat is ( )a modern style
aOpt[this.index].style.display="block";
Pink is ____ style this year .
英语翻译l am sure this style will [ ].
this._container.style.width = w + "px";