<html> <head> <title>ÇØÇÇCGI</title> <script> /* This script and many more are available free online at The JavaScript Source!! http://javascript.internet.com Created by: Patrick Fitzgerald | http://www.barelyfitz.com/ */ function truncate() { var len = 120; //¹®ÀÚ¿ ÀÚ¸¦ °¹¼ö ¼³Á¤ var p = document.getElementById('truncateMe'); if (p) { var trunc = p.innerHTML; if (trunc.length > len) {
/* Truncate the content of the P, then go back to the end of the previous word to ensure that we don't truncate in the middle of a word */ trunc = trunc.substring(0, len); trunc = trunc.replace(/\w+$/, '');
/* Add an ellipses to the end and make it a link that expands the paragraph back to its original size */ trunc += ' <a href="#" ' + 'onclick="this.parentNode.innerHTML=' + 'unescape(\''+escape(p.innerHTML)+'\');return false;">' + '<span style="font-size: 12px;font-weight:600;">[more...]</span></a>'; p.innerHTML = trunc; } } }
// Multiple onload function created by: Simon Willison // http://simon.incutio.com/archive/2004/05/26/addLoadEvent function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } }
addLoadEvent(function() { truncate(); }); </script>
</head> <body> <b>¹®Àå ¸Ç ³¡ More¸¦ Ŭ¸¯Çغ¸¼¼¿ä.</b><p> <p id="truncateMe"> <b>[½ºÆ÷Ã÷Çѱ¹ ¹®¹Ì¿µ±âÀÚ]</b> 76¸í Áß 'ÀÎÅͺä ÀßÇÏ´Â ¹Ì³à 16ÀÎ'¿¡ »ÌÇô
¹Ì½ºÄÚ¸®¾Æ ÀÌÇÏ´Ì°¡ ¸»¼Ø¾¾·Î ¼¼°è ¹Ì³àµé »çÀÌ¿¡¼ ¿ì¶Ò ¼¹´Ù.
¹Ì½ºÀ¯´Ï¹ö½º Çù·Â¾÷üÀÎ ±Û·Î¹úºäƼ½º ȨÆäÀÌÁö¿¡ µû¸£¸é ÀÌÇÏ´Ì´Â 'ÀÎÅͺ並 Àß ÇÏ´Â ¹Ì½º À¯´Ï¹ö½º 16ÀÎ'¿¡ ¼±Á¤µÆ´Ù.
±Û·Î¹úºäƼ½º ȨÆäÀÌÁö¿¡ µû¸£¸é ³ªÀÌÁö¸®¾Æ ´ëÇ¥¸¦ Á¦¿ÜÇÑ 76¸íÀÇ ¹Ì½ºÀ¯´Ï¹ö½º È帵éÀº ÃÖ±Ù ¼¼°è °¢±¹ÀÇ ½É»çÀ§¿ø´Ü°ú ÀÎÅͺ並 ÁøÇàÇß´Ù.
½É»çÀ§¿ø´ÜÀº ¸Å·Â ŵµ ¾ðº¯ Ä«¸®½º¸¶ µîÀ» ½É»ç±âÁØÀ¸·Î Á¤ÇØ Èĺ¸ Áß »óÀ§ 16¸íÀ» ¼±Á¤Çß´Ù. ÀÌÇÏ´Ì´Â ´ç´çÇÏ°Ô 16¸í ¾È¿¡ À̸§À» ¿Ã¸®¸ç ´Ù½Ã ÇÑ ¹ø ¼¼°èÀÎÀÇ À̸ñÀ» »ç·ÎÀâ¾Ò´Ù.
</p>
|