String °³Ã¼ÀÇ ¹®ÀÚ¿ ¾ç ³¡¿¡ <B>...</B> HTML ű׸¦ »ðÀÔÇÑ´Ù.
ÇʼöÀûÀÎ stringVar ÂüÁ¶´Â ÀÓÀÇÀÇ String °³Ã¼ ¶Ç´Â ¸®ÅÍ·²ÀÌ´Ù.
±½Àº±Û²ÃÀº µðÆúÆ® ±Û²Ãº¸´Ù ±½°í ÁøÇÑ ±Û²Ã·Î Ãâ·ÂµÈ´Ù.
bold´Â ¾Æ·¡ HTML ÅÂ±×¿Í È¿°ú°¡ °°´Ù. | |
normal bold, strong, | |
normal <B>bold</B>, <STRONG>strong</STRONG>, <SCRIPT>document.write('º¸Åë±ÛÀÚ'+'±½Àº ±ÛÀÚ'.bold())</SCRIPT> |
<SCRIPT> var br='<BR>'; // ÁÙ¹Ù²Þ var str=''; // Ãâ·Â ¹®ÀÚ¿ º¯¼ö ¼±¾ð var stringVar='¹®ÀÚ¿ °³Ã¼ÀÌ´Ù.'; // ¹®ÀÚ¿ º¯¼ö¸¦ ¼±¾ð str+='stringVar='+stringVar+br; // º¸Åë ±Û²Ã str+='stringVar.bold()='+stringVar.bold()+br+br; // ±½°Ô Ãâ·ÂÇÑ ±Û²Ã str+='"¹®ÀÚ¿".bold()+"°³Ã¼ÀÌ´Ù."='+'¹®ÀÚ¿'.bold()+' °³Ã¼ÀÌ´Ù.'+br; // ¹®ÀÚ¿¿¡ Á÷Á¢ ±½°ÔÇÏ¿© º¸Åë ±Û²Ã°ú °áÇÕ document.write(str); // °á°ú ¹®ÀÚ¿ ÀÏ°ý Ãâ·Â </SCRIPT>