로그인

이메일
비밀번호
DaeYoung's Blog : 위치로그 : 태그 : 방명록 : 관리자 : 새글쓰기
자바스크랩트 패키지 만들기
Web/JavaScript, (2007년 04월 26일 15시 01분)
<SCRIPT LANGUAGE="JavaScript">
<!--
var harogi = new Object(); //harogi 패키지 만듬

harogi.MyClass = function(){ //harogi.MyClass생성자
        var name = "";
        var id = "";
}

harogi.MyClass.prototype.setValue = function(name, id){
        this.name = name;
        this.id = id;
}

harogi.MyClass.prototype.getName = function(){
        return this.name;
}

harogi.MyClass.prototype.getId = function(){
        return this.id;
}

var mem1 = new harogi.MyClass();
mem1.setValue("홍길동", "hong");
document.write(mem1.getName());
document.write(mem1.getId());

//////////////////////////////////////
MyClass = function(){
        var name = "";
        var id = "";
}

MyClass.prototype.setValue = function(name, id){
        this.name = name;
        this.id = id;
}

MyClass.prototype.getName = function(){
        return this.name;
}

MyClass.prototype.getId = function(){
        return this.id;
}


var mem2 = new MyClass();
mem2.setValue("임꺽정", "im");
document.write(mem2.getName());
document.write(mem2.getId());
/////////////////////////////////////////

harogi.newClass = {}; //패키지 정의

harogi.newClass.MyClass = function(){
        var name = "";
        var id = "";
}

harogi.newClass.MyClass.prototype.setValue = function(name, id){
        this.name = name;
        this.id = id;
}

harogi.newClass.MyClass.prototype.getName = function(){
        return this.name;
}

harogi.newClass.MyClass.prototype.getId = function(){
        return this.id;
}

var mem3 = new harogi.newClass.MyClass();
mem3.setValue("임꺽정", "im");
document.write(mem3.getName());
document.write(mem3.getId());
//-->
</SCRIPT>
http://laedu.net/trackback/12
DaeYoung's Blog 블로그에 오신것을 환영해요^^
웹기반 프로그래밍에 관한 것들을 모을 예정이었는데..
«   2024년 08월   »
        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
Javax.mail 참고 사이트.
C# TextBox KeyDown, KeyPr...
SID가 여러개 있을때 'ORA...
https://scrapingmaster.blogg...
https://scrapingmaster.blogg.. 2023년
expertdecoders.com.
expertdecoders.com 2023년
expertdecoders.
expertdecoders 2023년
best decaptcha service.
best decaptcha service 2023년
capcher.
capcher 2023년
111
596
1016017