enchant.jsで入力フォームを作成
var core = new Core(288, 512); core.onload = function() { var input = new Entity(); //DOM設定 input._element = document.createElement('input'); input._element.setAttribute('type','text'); input._element.setAttribute('maxlength','10'); input._element.setAttribute('id','test'); input._element.setAttribute('value','test'); input.width = 100; input.height = 20; input.x = 10; input.y = 50; //rootSceneに追加 core.rootScene.addChild(input); //毎フレームチェック input.on(Event.ENTER_FRAME, function() { console.log(input._element.value); }); }
参考:jsdo.it