javascript 关于this
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/08/20 02:46:36
javascript 关于this
function makeArray(n){
this.length=n //这个地方的this是指的什么?
return this
}
function hexfromdec(num) {
hex=new makeArray(1);
var hexstring="";
var shifthex=16;
var temp1=num;
for(x=1; x>=0; x--) {
hex[x]=Math.round(temp1/shifthex - .5);
hex[x-1]=temp1 - hex[x] * shifthex;
temp1=hex[x-1];
shifthex /= 16;
}
for (x=1; x>=0; x--) { hexstring+=getletter(hex[x]); }
return (hexstring);
}
function getletter(num) {
if (num < 10) { return num; }
else {
if (num == 10) { return "A" }
if (num == 11) { return "B" }
if (num == 12) { return "C" }
if (num == 13) { return "D" }
if (num == 14) { return "E" }
if (num == 15) { return "F" }
}
}
function rainbow(text){
var color_d1;
var allstring="";
for(i=0;i
function makeArray(n){
this.length=n //这个地方的this是指的什么?
return this
}
function hexfromdec(num) {
hex=new makeArray(1);
var hexstring="";
var shifthex=16;
var temp1=num;
for(x=1; x>=0; x--) {
hex[x]=Math.round(temp1/shifthex - .5);
hex[x-1]=temp1 - hex[x] * shifthex;
temp1=hex[x-1];
shifthex /= 16;
}
for (x=1; x>=0; x--) { hexstring+=getletter(hex[x]); }
return (hexstring);
}
function getletter(num) {
if (num < 10) { return num; }
else {
if (num == 10) { return "A" }
if (num == 11) { return "B" }
if (num == 12) { return "C" }
if (num == 13) { return "D" }
if (num == 14) { return "E" }
if (num == 15) { return "F" }
}
}
function rainbow(text){
var color_d1;
var allstring="";
for(i=0;i
![javascript 关于this](/uploads/image/z/4578098-50-8.jpg?t=javascript+%E5%85%B3%E4%BA%8Ethis)
好厉害呀
javascript 关于this
javascript中的this指向谁
关于javascript的this在代码中代表什么?为什么一个是this一个是this.form?
javascript语句问题:this['className']?this['className']='nav_swit
javascript 里 this.checked = !this.checked;怎么解释?
javascript,ext var sn = this.selModel.selNode || {};中的"||
谁帮忙解释下javascript:this.disabled = true;this.document.form.sub
这句JAVASCRIPT的意思是什么?var selectId = (this.name||this.id)+'__jQ
onload="javascript:if(this.width>screen.width-350)this.width
javascript中onclick(this) 中的this指当前什么东西?不太懂this放在onclick里面是指什
JAVASCRIPT代码问题:onmouseover="mOver(this)" onmouseout="mOut(th
JavaScript选择题!