0
객체에서 정보를 수집하기 위해 변수를 사용하려고합니다. 나는 PHP 프로그래머이고 아직 자바 스크립트가 좋지 않다.자바 스크립트 객체 변수를 사용하여 객체 가져 오기
var priceobj= {'Youth Small':'0', 'Youth Meduim':'0', 'Youth Large':'0','Adult Small':'0','Adult Medium':'0','Adult Large':'0','Adult XL':'0','Adult XXL':'2','Adult XXXL':'3'};
var os0 = $('#os0').val(); // value will be one of the options in priceobj
var value = priceobj.os0 // this should read 0,2,3 depending on the value of os0