»
EnglishFrenchVietnamese

Print - Tokenizer - JavaScriptBank.com

Full version: jsB@nk » Utility » Generator » Tokenizer
URL: https://www.javascriptbank.com/tokenizer.html

Tokenizer © JavaScriptBank.comA simple text editor.

Full version: jsB@nk » Utility » Generator » Tokenizer
URL: https://www.javascriptbank.com/tokenizer.html



JavaScript
<SCRIPT>document.onmouseup=function focused(){if(area.style.zIndex=="1"){area.style.zIndex="2";area_2.style.zIndex="1";}else{area.style.zIndex="1";area_2.style.zIndex="2";}}function token(){area.style.zIndex="1";area_2.style.zIndex="2";data=area.innerHTML;for(i=0;i<data.length;i++){data=data.replace('&lt;','#1');data=data.replace('&gt;','#1');}for(i=0;i<data.length;i++){data=data.replace('#1','<font color=red><<!>');data=data.replace('#1','<!>></font>');data=data.replace('="','<font color=green>=&quot;<font color=blue>');data=data.replace('"','</font>&quot;</font>');}area_2.innerHTML=data;}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<b>Type some HTML tag to see</b><DIV id=area_2 style="BORDER-RIGHT: 2px inset; PADDING-RIGHT: 20px; BORDER-TOP: 2px inset; PADDING-LEFT: 20px; Z-INDEX: 1; LEFT: 30px; PADDING-BOTTOM: 20px; BORDER-LEFT: 2px inset; WIDTH: 400px; PADDING-TOP: 20px; BORDER-BOTTOM: 2px inset; POSITION: relative; TOP: 30px; HEIGHT: 300px; BACKGROUND-COLOR: white"></DIV><DIV id=area onkeyup=token() contentEditable=true style="BORDER-RIGHT: 2px inset; PADDING-RIGHT: 20px; BORDER-TOP: 2px inset; PADDING-LEFT: 20px; Z-INDEX: 2; LEFT: 30px; PADDING-BOTTOM: 20px; BORDER-LEFT: 2px inset; WIDTH: 400px; PADDING-TOP: 20px; BORDER-BOTTOM: 2px inset; POSITION: relative; TOP: -270px; HEIGHT: 300px; BACKGROUND-COLOR: white"></DIV><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->