JAKARTAPROJECT
JAKARTA TIPJSP TIPJSP Áú¹®&´äº¯DATABASE TIPJAVASCRIPT TIPWEBHACKING TIP±âŸ TIP
ÀÚ¹Ù½ºÅ©¸³Æ® ÆÁ
ÀÚ¹Ù½ºÅ©¸³Æ® ÆÁ
ÀÚ¹Ù½ºÅ©¸³Æ® ¹× CSS ÆÁ °Ô½ÃÆÇÀÔ´Ï´Ù
¾µ¸¸ÇÑ ¹®ÀÚ¿­ ½ºÅ©¸³Æ®
GoodBug
À̹ÌÁö ½½¶óÀÌ´õ º¸±â

phpschoolÀÇ ÇູÇÑ°í´Ï´ÔÀÇ ±ÛÀÔ´Ï´Ù.

 

http://www.phpschool.com/bbs2/inc_view.html?id=10911&code=tnt2&start=570&mode=&field=&search_name=&operator=&period=&category_id=&s_que=

 

 

// HTML Ư¼ö¹®ÀÚ¸¦ º¯È¯
String.prototype.htmlChars = function () {
       var str = ((this.replace('"', '&')).replace('"', '"')).replace('\'', ''');
       return (str.replace('<', '&lt;')).replace('>', '&gt;');
}

 

// ÁÂ¿ì °ø¹é¾ø¾Ö´Â ÇÔ¼ö
String.prototype.trim = function () { return this.replace(/(^s*)|(s*$)/g, ""); }

 

// ¿ÞÂÊ °ø¹é¾ø¾Ö´Â ÇÔ¼ö
String.prototype.ltrim = function () { return this.replace(/^s*/g, ""); }

 

// ¿À¸¥ÂÊ °ø¹é¾ø¾Ö´Â ÇÔ¼ö
String.prototype.rtrim = function () { return this.replace(/s*$/g, ""); }

 

// ű׸¸ Á¦°Å
String.prototype.stripTags = function () {
       var str = this;
       var pos1 = str.indexOf('<');

    if (pos1 == -1) return str;
    else {
        var pos2 = str.indexOf('>', pos1);
        if (pos2 == -1) return str;
        return (str.substr(0, pos1) + str.substr(pos2+1)).stripTags();
    }
}

 

// ´ë¼Ò¹®ÀÚ ±¸º°ÇÏÁö ¾Ê°í ´Ü¾î À§Ä¡ ã±â
String.prototype.ipos = function (needle, offset) {
       var offset = (typeof offset == "number")?offset:0;
       return str.toLowerCase().indexOf(needle.toLowerCase(), offset);
}

 

// ´ë¼Ò¹®ÀÚ ±¸º°ÇÏÁö ¾Ê°í µÚ¿¡¼­ºÎÅÍ ´Ü¾îÀ§Ä¡ ã±â
String.prototype.ripos = function (needle, offset) {
       var offset = (typeof offset == "number")?offset:0;
       return str.toLowerCase().lastIndexOf(needle.toLowerCase(), offset);
}

 

// ¹®ÀÚ¿­À» ¹è¿­·Î
String.prototype.toArray = function () {
       var len = this.length;
       var arr = new Array;
       for (var i=0; i<len; i++) arr[i] = this.charAt(i);
       return arr;
}

 

//////////////////////////////////////////////////////////

prototype À¸·Î Á¤ÀǵǾîÀ־...

("<b>test</b>").stripTags();

ȤÀº

var str = "  !!!! ";
str = str.trim();

°ú °°ÀÌ »ç¿ë°¡´ÉÇÕ´Ï´Ù.

/////////////////////////////////////////////////////////

 

from http://mygony.com/tt/index.php?pl=44&nc=1

2005-02-15 16:05:25
211.189.124.***

 

ÁÁÀº»ý°¢ ^^

0Á¡ (0¸í)
µ¡±Û 0°³ | ÅÂ±× 0°³ | °ü·Ã±Ûº¸±â
ű×ÀÔ·Â
½±Ç¥(,)±¸ºÐÀ¸·Î Çѹø¿¡ ¿©·¯ ű׸¦ ÀÔ·ÂÇÒ¼ö ÀÖ½À´Ï´Ù
À̸§ ºñ¹Ð¹øÈ£
ÀÚ¹Ù½ºÅ©¸³Æ® ÆÁ
ÀÚ¹Ù½ºÅ©¸³Æ® ¹× CSS ÆÁ °Ô½ÃÆÇÀÔ´Ï´Ù
! ¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ÀÏÀÚ Á¶È¸
220 img À̹ÌÁö ºÎµå·´°Ô ÁÙÀ̱â 1 GoodBug 2009-12-18 8,193
219 rss xml ÆĽÌÇÏ´Â ¸ðµâ ÀÔ´Ï´Ù. 1 °í°í½Ì 2009-11-27 7,641
218 Æ®¸® ÀÔ´Ï´Ù . 1 °í°í½Ì 2009-11-27 5,873
217 ¿¡·¯Ã³¸® 1 kaiser 2009-05-11 6,088
216 À¥ÆäÀÌÁö º¹»ç ¹æÁö ÇØÁö ÇÏ´Â ¹ý kaiser 2009-05-03 11,673
215 javascript ÇÑ±Û Â¥¸£±â 1 1 kaiser 2008-08-14 7,985
214 rolling ·Ñ¸µ ½ºÅ©¸³Æ® 1 2 GoodBug 2008-07-11 10,128
213 alert ¸Þ½ÃÁö¸¦ print ó·³ »ç¿ëÇϱâ 2 °í°í½Ì 2008-06-10 8,675
212 onload onload Æã¼ÇÀÌ Á¤ÀǵǾî ÀÖ´Â »óȲ¿¡¼­ onload¿¡ Ãß°¡Çϱâ 1 GoodBug 2008-04-11 8,440
211 javascript ÀÚ¹Ù½ºÅ©¸³Æ® °³¹ß°¡À̵å 4 1 kaiser 2008-04-09 8,898
210 escape HTML escpae code 1 GoodBug 2008-04-02 6,499
209 optgroup SELECT ¸ñ·Ï ±×·ìº°·Î ¹­±â 1 1 GoodBug 2008-03-06 8,215
208 µ¿Àû Å×À̺í Å×ÀÌºí¿¡ µ¿Àû TR »ðÀÔ ¹× »èÁ¦ IE, FF °ø¿ë 1 GoodBug 2008-01-18 11,745
207 drag Javascript drag and drop 1 1 GoodBug 2008-01-16 8,171
206 sort Sortable HTML table 2 GoodBug 2008-01-16 7,402
205 scrollable table Scrollable HTML table 1 GoodBug 2008-01-16 7,087
204 CSS CSS centered layout 1 1 GoodBug 2008-01-16 6,685
203 utf8 Javascript UTF-8 1 GoodBug 2008-01-16 7,914
202 encode Javascript url decode, encode 2 GoodBug 2008-01-16 8,159
201 ¾Ïȣȭ Javascript MD5 2 GoodBug 2008-01-15 7,364
copyright 2005-2024 by Unicorn