myFunction=function anonymous(param
) {
name=typeof this;document.write(name+" 출력")
}
myFunction(); object 출력
void (myFunction)=undefined
void (myFunction()); object 출력
결과
표시장
<SCRIPT>
br='<BR>';
var myFunction=new Function('param','name=typeof this;document.write(name+" 출력")');
document.write('myFunction=<FONT color=blue>'+myFunction+'</FONT>'+br);
document.write('myFunction(); <FONT color=blue>');
myFunction();
document.write('</FONT>'+br+br);
document.write('void (myFunction)=<FONT color=blue>'+void (myFunction)+'</FONT>'+br);
document.write('void (myFunction()); <FONT color=blue>');
void myFunction();
document.write('</FONT>');
function bgChange(color){
str='void (document.bgColor=color)=<FONT color=blue>'+void (document.bgColor=color)+'</FONT>'+br;
str+='document.bgColor=<FONT color=blue>'+document.bgColor+'</FONT>';
showbox.innerHTML=str;
}
</SCRIPT>
<DIV id=showbox class=show style=height:3em title="결과">결과<BR>표시장</DIV>
<DIV class=show style=padding:8px>
<FORM style=margin-bottom:0><INPUT type=button value="배경색 변환" onClick="bgChange('ffffdd')">
<INPUT type=button value="이창 닫�" onClick="self.close()">
</FORM>
</DIV>