fromCharCode

種類メソッド
書式 String.fromCharCode(文字コード)
解説
文字コードを文字に変換します。文字コードは,(カンマ)で区切って連続して書くことができます。
サンプルコード
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Sample</title>
<style type="text/css"><!--
body { margin:0px; }
form { position:absolute; top:10;left:10px; }
--></style>
<script type="text/javascript"><!--
window.onload = function()
{
str = String.fromCharCode(66);
document.getElementById("txtField").value = str;
}
// --></script>
</head>
<body>
<img src="Default.png">
<form>
<input type="text" id="txtField" size=40"><br>
</form>
</body>
</html>
実際のスクリプトをダウンロード