Page 74 - Nodejs 교과서 개정2판
P. 74

ࠁউҗ ޖҙೠ ؘ੉ఠٜ਷ ੗ਬ܂ѱ ೐۠౟ূ٘۽ ࠁղب ؾפ׮  ੗߄झ௼݀౟ ߸ࣻী ੷੢೧ب غ૑݅ )5.-

          ীب )5.-җ ҙ۲ػ ؘ੉ఠܳ ੷੢ೞח ҕध੸ੋ ߑߨ੉ ੓णפ׮  ߄۽ ؘ੉ఠ ࣘࢿ EBUB BUUSJCVUF ੑפ׮




           <ul>
           		<li	data-id="1"	data-user-job="programmer">Zero</li>
           		<li	data-id="2"	data-user-job="designer">Nero</li>
           		<li	data-id="3"	data-user-job="programmer">Hero</li>
           		<li	data-id="4"	data-user-job="ceo">Kero</li>
           </ul>
           <script>
           		console.log(document.querySelector('li').dataset);
           		//	{	id:	'1',	userJob:	'programmer'	}
           </script>



         ਤ৬ э੉ )5.- కӒ੄ ࣘࢿਵ۽ data-۽ द੘ೞח Ѫٜਸ ֍णפ׮  ੉ٜ੉ ؘ੉ఠ ࣘࢿੑפ׮  ৈӝࢲח da

         ta-id৬ data-user-jobਸ ઱঻णפ׮  ചݶী աఋա૑ח ঋ૑݅ ਢ গ೒ܻா੉࣌ ҳزী ೙ਃೠ ؘ੉ఠٜੑפ
         ׮  ա઺ী ੉ ؘ੉ఠٜਸ ࢎਊ೧ ࢲߡী ਃ୒ਸ ࠁղѱ ؾפ׮


         ؘ੉ఠ ࣘࢿ੄ ੢੼਷ ੗߄झ௼݀౟۽ औѱ ੽Ӕೡ ࣻ ੓׮ח ੼ੑפ׮  script కӒܳ ࠁݶ dataset ࣘࢿਸ ా

         ೧ ୐ ߣ૩ li కӒ੄ ؘ੉ఠ ࣘࢿী ੽ӔೞҊ ੓णפ׮  ױ  ؘ੉ఠ ࣘࢿ ੉ܴ੉ ઑӘঀ ߸ഋغ঻णפ׮  খ੄ E
         BUB  ੽فযח ࢎۄ૑Ҋ   ٍী ਤ஖ೠ Ӗ੗ח ؀ޙ੗о ؾפ׮  data-idח id  data-user-job਷ userJob੉ غ

         ח Ѫੑפ׮

         ߈؀۽ datasetী ؘ੉ఠܳ ֍যب )5.- కӒী ߈৔ؾפ׮  dataset.monthSalary	=	10000;ਸ ֍ਵݶ data

         -month-salary="10000"੉ۄח ࣘࢿ੉ ࢤӤפ׮

         ա઺ী पण ৘ઁীࢲ ؘ੉ఠ ࣘࢿਸ ੗઱ ॳѱ غ޲۽ ӝর೧فࣁਃ

         ੉ઁ ੉ ଼੄ पणী ೙ਃೠ ૑धਸ যו ੿ب ੊ഊणפ׮  पणਸ ೞ׮о ӝরա૑ ঋח ࠗ࠙੉ ੓׮ݶ ੉ߣ ੢

         ਵ۽ جই৬ࢲ ׮द ҕࠗೞݶ ؾפ׮  ׮਺ ੢ࠗఠח ࠄѺ੸ਵ۽ ֢٘ܳ ࢓ಝࠁѷणפ׮
   69   70   71   72   73   74   75   76   77   78   79