1&1 DSL
Flashhilfe.de - Flash Community

Prototype: String.removeHTML [Flash 8]

Forum > Tipps & Tricks zu Flash, Flex und Adobe AIR > Prototype: String.removeHTML

 


AntwortenRegistrieren Seite1  

 19.07.2003, 00:29 
Benutzerbild von SebastianFlashhilfe.de Moderator
Beiträge: 6940
Wohnort: München
Registriert: Jan 2002

Prototype: String.removeHTML
Entfernt HTML Tags aus einem String

Prototype:
ActionScript:
1
2
3
4
5
6
7
8
9
String.prototype.removeHTML = function() {
   var temp = "", s;
   while((s=this.indexOf("<"))!=-1) {
      temp += this.substr(0,s);
      this = this.substr(this.indexOf(">")+1);
   }
   return temp+this;
};
ASSetPropFlags(String.prototype,"removeHTML",1);


Beispiel Aufruf:
ActionScript:
1
2
3
4
htmlStr = "<b>Flashhilfe.de</b><p> <br>::</p>:<br> <font color=\"green\">Flash-Community</font> :::";
trace("htmlStr: " + htmlStr);
textStr = htmlStr.removeHTML();
trace("textStr: " + textStr);

Flex Freelancer || Flashhilfe @ Twitter || XING Profil
Schlagwörter: prototype, String
 
Themen
Ähnliche Beiträge zum Thema
number in string konvertieren [Flash 10] 14.02.2010 - marco_reinhold
 

AntwortenRegistrieren Seite1  

Schnellantwort

Du musst registriert sein, um diese Funktion nutzen zu können.
Partner Webseiten: DesignerInAction.de   Designnation.de   Mediengestalter.info   php-resource.de   phpforum.de   phpwelt.de   Pixelio.de   PSD-Tutorials.de   Tutorials.de

Haftungsausschluss   Datenschutzerklärung   Hier Werben   Impressum
© 1999-2012 Sebastian Wichmann - Flashhilfe.de