js 정의 클래스 대상, 속성 및 방법

더 읽 기
var provinces = new Array();
comefrom.prototype.loca = null;
comefrom.prototype.locacity = null;
comefrom.prototype.abbreviation = null;
function comefrom(loca,locacity,abbreviation) { this.loca = loca; this.locacity = locacity; this.abbreviation = abbreviation}
provinces[0]= new comefrom("      ","      ");
provinces[1] = new comefrom("   ","|   "," ");
provinces[2] = new comefrom("   ","|   "," ");
provinces[3] = new comefrom("   ","|   |   "," ");
provinces[4] = new comefrom("   ","|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |  "," ");
provinces[5] = new comefrom("   ","|   |   |   |   |   |   |   |   |   "," ");


/**
 *      
 * @return void
 */
pageInit : function() {
	var provinceList = new Array();
	var hiddenProvinces = _STAGE.hiddenProvinces;
	for(i = 1;i < provinces.length; i++){
		var loca = provinces[i].loca;
		provinceList.push('
'+loca+' ');
}
},
 
result:
comefrom {loca: "   ", locacity: "|   ", abbreviation: " ", loca: null, locacity: null…}
abbreviation: " "
loca: "   "
locacity: "|   "

좋은 웹페이지 즐겨찾기