<!-- saved from url=(0014)about:internet --> <!-- Script: Espizo Author: Hitrock Camellia Shinopy Language: JavaScript Remarks... Use for: Microsoft Windows for Handheld PC 2000; Microsoft Windows CE Version 3.0 Microsoft Internet Explorer for Handheld PC 4.01 HTML 3.0 History... 2007-DEC-12: Created 2008-JAN-20: "newText = newText + " => "newText += " --> <html> <head> <title>Espizo</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script language="JavaScript"> <!-- // // window.onload = function(){ document.getElementById("myTextarea").focus(); } // window.onload = function(){ document.myFORM.myTEXT.focus(); } window.onload = function(){ MyTextAreaEnd(); } function MyEspizo( param ) { // 代用文字を正書文字に置換 var myText = document.myFORM.myTEXT.value; var myChar = myText.charAt(0); // for( var newText = "", i = 1; i <= myText.length; i++ ) { switch( myText.charAt(i) ) { case "_": var newChar = MyEspizoAeiou( myChar ); newText += newChar.charAt(0); myChar = ""; if( newChar.length > 1 ) { myChar = myText.charAt(i); } break; case "^": var newChar = MyEspizoCghjsu( myChar ); newText += newChar.charAt(0); myChar = ""; if( newChar.length > 1 ) { myChar = myText.charAt(i); } break; case "~": if( myChar == "u" || myChar == "U" ) { newText += MyEspizoCghjsu( myChar ); myChar = ""; } else { newText += myChar; myChar = myText.charAt(i); } break; default: if( param == "^x" && myText.charAt(i) == "x" ) { var newChar = MyEspizoCghjsu( myChar ); newText += newChar.charAt(0); myChar = ""; if( newChar.length > 1 ) { myChar = myText.charAt(i); } } else { newText += myChar; myChar = myText.charAt(i); } } // switch } // for // テキストエリアに再度書き込み document.myFORM.myTEXT.value = newText; MyTextAreaEnd() } // function MyEspizo *----*----* *----*----* *----*----* *----*----* function MySurrogate( param ) { // 正書文字を代用文字に置換 var myText = document.myFORM.myTEXT.value; // for( var newText = "", i = myText.length; i >= 0; i-- ) { var myChar = MySurrogateAeiou( myText.charAt(i) ); myChar = MySurrogateCghjsu( myChar, param ); newText = myChar + newText; } // for // テキストエリアに再度書き込み document.myFORM.myTEXT.value = newText; MyTextAreaEnd() } // function MySurrogate *----*----* *----*----* *----*----* *----*----* function MyEspizoAeiou( myChar ) { switch( myChar ) { case "A": return( String.fromCharCode( 194 ) ); break; case "E": return( String.fromCharCode( 202 ) ); break; case "I": return( String.fromCharCode( 206 ) ); break; case "O": return( String.fromCharCode( 212 ) ); break; case "U": return( String.fromCharCode( 219 ) ); break; case "a": return( String.fromCharCode( 226 ) ); break; case "e": return( String.fromCharCode( 234 ) ); break; case "i": return( String.fromCharCode( 238 ) ); break; case "o": return( String.fromCharCode( 244 ) ); break; case "u": return( String.fromCharCode( 251 ) ); break; default: return( myChar + "!" ); } } // function MyEspizoAeiou *----*----* *----*----* *----*----* *----*----* function MyEspizoCghjsu( myChar ) { switch( myChar ) { case "C": return( String.fromCharCode( 264 ) ); break; case "G": return( String.fromCharCode( 284 ) ); break; case "H": return( String.fromCharCode( 292 ) ); break; case "J": return( String.fromCharCode( 308 ) ); break; case "S": return( String.fromCharCode( 348 ) ); break; case "U": return( String.fromCharCode( 364 ) ); break; case "c": return( String.fromCharCode( 265 ) ); break; case "g": return( String.fromCharCode( 285 ) ); break; case "h": return( String.fromCharCode( 293 ) ); break; case "j": return( String.fromCharCode( 309 ) ); break; case "s": return( String.fromCharCode( 349 ) ); break; case "u": return( String.fromCharCode( 365 ) ); break; default: return( myChar + "!" ); } } // function MyEspizoCghjsu *----*----* *----*----* *----*----* *----*----* function MySurrogateAeiou( myChar ) { switch( myChar ) { case String.fromCharCode( 194 ): return( "A_" ); break; case String.fromCharCode( 202 ): return( "E_" ); break; case String.fromCharCode( 206 ): return( "I_" ); break; case String.fromCharCode( 212 ): return( "O_" ); break; case String.fromCharCode( 219 ): return( "U_" ); break; case String.fromCharCode( 226 ): return( "a_" ); break; case String.fromCharCode( 234 ): return( "e_" ); break; case String.fromCharCode( 238 ): return( "i_" ); break; case String.fromCharCode( 244 ): return( "o_" ); break; case String.fromCharCode( 251 ): return( "u_" ); break; default: return( myChar ); } } // function MySurrogateAeiou *----*----* *----*----* *----*----* *----*----* function MySurrogateCghjsu( myChar, param ) { switch( myChar ) { case String.fromCharCode( 264 ): return( "C" + param ); break; case String.fromCharCode( 284 ): return( "G" + param ); break; case String.fromCharCode( 292 ): return( "H" + param ); break; case String.fromCharCode( 308 ): return( "J" + param ); break; case String.fromCharCode( 348 ): return( "S" + param ); break; case String.fromCharCode( 364 ): return( "U" + param ); break; case String.fromCharCode( 265 ): return( "c" + param ); break; case String.fromCharCode( 285 ): return( "g" + param ); break; case String.fromCharCode( 293 ): return( "h" + param ); break; case String.fromCharCode( 309 ): return( "j" + param ); break; case String.fromCharCode( 349 ): return( "s" + param ); break; case String.fromCharCode( 365 ): return( "u" + param ); break; default: return( myChar ); } } // function MySurrogateCghjsu *----*----* *----*----* *----*----* *----*----* function MyTextAreaEnd() { // テキストエリアの末尾に挿入ポイント(キャレット)を移動させる var myTextRng = document.myFORM.myTEXT.createTextRange(); myTextRng.move( "character",document.myFORM.myTEXT.value.length ); myTextRng.select(); } // function MyTextAreaEnd *----*----* *----*----* *----*----* *----*----* // --> </script> </head> <body> <form name="myFORM"> <textarea rows="6" cols="71" name="myTEXT" id="myTextarea"></textarea><br> <left> <input type="button" value=" ^x suffix " onClick="MyEspizo('^x')"> <input type="button" value=" ^ suffix " onClick="MyEspizo('^')"> <input type="button" value="x surrogate" onClick="MySurrogate('x')"> <input type="button" value="^ surrogate" onClick="MySurrogate('^')"> </left> <left> <br><br><font size="1">TaskBar: Alt+Esc<br> Refresh ( CE / PC ): Shift+Esc / Ctrl+R<br> Menue: Alt+...<br> Select All: Ctrl+A<br> Copy: Ctrl+C<br> Paste: Ctrl+V<br></font> </left> </form> </body> </html>