°³Ã¼ ¼Ó¿¡¼ ¹®ÀÚÀÇ º¯È¯ Ç¥Çö ¹æ½ÄÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
none | µðÆúÆ®À̸ç, ÅؽºÆ®°¡ º¯È¯µÇÁö ¾Ê´Â´Ù. |
capitalize | °¢ ´Ü¾îÀÇ Ã¹±ÛÀÚ°¡ ´ë¹®ÀÚ·Î º¯È¯µÈ´Ù. |
uppercase | ¸ðµç ±ÛÀÚ°¡ ´ë¹®ÀÚ·Î º¯È¯µÈ´Ù. |
lowercase | ¸ðµç ±ÛÀÚ°¡ ¼Ò¹®ÀÚ·Î º¯È¯µÈ´Ù. |
ÀÌ ¼Ó¼ºÀº currentStyle¿¡¼´Â ÀбâÀü¿ëÀÌ°í, ±×¿ÜÀÇ °³Ã¼¿¡¼´Â Àбâ/¾²±âÀ̸ç, µðÆúÆ®°ªÀº noneÀÌ´Ù.
CSS(Cascading Style Sheets) ¾ÖÆ®¸®ºäÆ®´Â »ó¼ÓµÈ´Ù.
°³Ã¼ | script | CSS | IE ¹öÀü |
---|
ÀÌ ¼Ó¼ºÀº CSS1(Cascading Style Sheets, Level 1)¿¡¼ Á¤ÀǵǾú´Ù.
textTransform ¼Ó¼ºÀ» »ç¿ëÇÏ¿© ´ë¹®ÀÚ, ¼Ò¹®ÀÚ·Î º¯È¯ÇÑ´Ù.
<SCRIPT> function doShow(job){ if (job==0) divObj.style.textTransform='none'; if (job==1) divObj.style.textTransform='uppercase'; if (job==2) divObj.style.textTransform='lowercase'; if (job==3) divObj.style.textTransform='capitalize'; str='divObj.style.textTransform=<FONT color=blue>'+divObj.style.textTransform+'</FONT>'; showA.innerHTML=str; } </SCRIPT> <BODY> <DIV id="divObj" style="color:blue;font-size:16"> divObj.style.textTransform </DIV> divObj.style.textTransform= <BUTTON onclick="doShow(0)" style="width:100">none</BUTTON> <BUTTON onclick="doShow(1)" style="width:100">uppercase</BUTTON> <BUTTON onclick="doShow(2)" style="width:100">lowercase</BUTTON> <BUTTON onclick="doShow(3)" style="width:100">capitalize</BUTTON> <DIV id=showA>°á°ú Ç¥½Ãâ</DIV>
À§ ¿¹Á¦¿Í °°À¸³ª ¿©±â¼´Â classNameÀ» È£ÃâÇÏ¿© textTransform ¼Ó¼ºÀ» º¯°æ½ÃŲ´Ù.
<STYLE> .tsUpper { text-transform:uppercase } .tsLower { text-transform:lowercase } .tsNone { text-transform:none } .tsCapt { text-transform:capitalize } </STYLE> <SCRIPT> function doShowClass(job){ if (job==0) div2Obj.className='tsNone'; if (job==1) div2Obj.className='tsUpper'; if (job==2) div2Obj.className='tsLower'; if (job==3) div2Obj.className='tsCapt'; str='div2Obj.className=<FONT color=blue>'+div2Obj.className+'</FONT><BR>'; str+='div2Obj.currentStyle.textTransform=<FONT color=blue>'+div2Obj.currentStyle.textTransform+'</FONT><BR>'; showB.innerHTML=str; } </SCRIPT> <BODY> <DIV id="div2Obj" style="color:blue;font-size:16"> div2Obj.className, div2Obj.style.textTransform </DIV> div2Obj.style.textTransform= <BUTTON onclick="doShowClass(0)" style="width:100">none</BUTTON> <BUTTON onclick="doShowClass(1)" style="width:100">uppercase</BUTTON> <BUTTON onclick="doShowClass(2)" style="width:100">lowercase</BUTTON> <BUTTON onclick="doShowClass(3)" style="width:100">capitalize</BUTTON> <DIV id=showB>°á°ú Ç¥½Ãâ</DIV>