»
AnglaisFran�aisVietnamien

Imprimer - Aux entités HTML script - JavaScriptBank.com

Version compl�te: jsB@nk » Utilitaire » Convertisseur » Aux entités HTML script
URL: https://www.javascriptbank.com/html-to-entities-script.html

Aux entités HTML script © JavaScriptBank.comCet JavaScript convertit HTML spécifique caractères à l'intérieur de leurs entités version utilisateur a entré les données comme un TEXTAREA avant la forme est présentée.

Version compl�te: jsB@nk » Utilitaire » Convertisseur » Aux entités HTML script
URL: https://www.javascriptbank.com/html-to-entities-script.html



JavaScript
<SCRIPT type=text/javascript>// HTML to Entities (form) script- By JavaScriptKit.com (http://www.javascriptkit.com)// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/// This notice must stay intact for usefunction html2entities(){var re=/[(<>"'&]/gfor (i=0; i<arguments.length; i++)arguments[i].value=arguments[i].value.replace(re, function(m){return replacechar(m)})}function replacechar(match){if (match=="<")return "&lt;"else if (match==">")return "&gt;"else if (match=="\"")return "&quot;"else if (match=="'")return "&#039;"else if (match=="&")return "&amp;"}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM><TEXTAREA style="WIDTH: 400px; HEIGHT: 100px" name=data1></TEXTAREA><BR><INPUT onclick=html2entities(this.form.data1) type=button value="Convert special chars to entities"> </FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->