블로그 이미지
안녕1999

카테고리

전체 (3067)
자바스크립트 (20)
안드로이드 (14)
WebGL (4)
변비 (17)
정치,경제 (35)
C언어,ARM (162)
컴퓨터(PC, Note Book, 윈.. (41)
전자회로, PCB (27)
유머,안웃긴,GIF,동영상 (118)
국부론60 (71)
모듈(PCB) (3)
건강 (2)
FreeCAD (25)
PADS (43)
퇴직,퇴사,구직,취업 활동 (3)
C# (86)
엑셀 (8)
워드 (0)
LabView (6)
레고 (30)
FPGA (0)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글

function test_gloval_function_x()
{
	console.log("test_gloval_function_x()");
}
var data1="global data1";
function test_meber_function_this()
{
	var o={};
	o.data1="meber data1";
	console.log("멤버함수내에서 this를 항상 사용해야하는가?(생략가능한가?)");

	o.test_gloval_function_x=function()
	{
		console.log("meber_function_x()");
	}
	o.test=function()
	{
		test_gloval_function_x();//test_gloval_function_x()
		console.log(data1);//global data1

		this.test_gloval_function_x();//meber_function_x
		console.log(this.data1);//meber data1
	}
	return o;
}
var a=test_meber_function_this();
a.test();

결론 : 사용해야함


'자바스크립트' 카테고리의 다른 글

Sleep  (0) 2017.06.12
this  (0) 2017.06.08
sprintf  (0) 2017.05.27
자바스크립트 - 클래스(Class) 만들기  (0) 2017.05.19
바이트 배열 Uint8Array  (0) 2017.04.24
Posted by 안녕1999
, |

최근에 달린 댓글

글 보관함