cocos2d-js 如何在web中实现一个正常的输入框(input)

cocos2d-js 如何在web中实现一个正常的输入框(input)

现在使用的输入框样式是弹出来的,这样子不够美观,想做好看一点,好像正常流量网页的input输入框那样子,直接弹出键盘输入就好了,不要再弹出对话框了。

新手,请求帮助,谢谢。弹出框是在手机界面才会有的。

可以直接使用js原生实现动态添加一个input输入框,下面一段作为参考,网上资料很多的
var input = document.createElement(‘input’);
input.setAttribute(‘type’, ‘text’);
input.setAttribute(‘name’, ‘name’);
input.setAttribute(‘id’, ‘id’);
//input.setAttribute(‘class’, ‘class’);
//input.setAttribute(‘maxlength’, ‘10’);
//input.setAttribute(‘style’, ‘width:80px;’);
//input.setAttribute(‘value’, value);}
parent.insertBefore(input,null);

直接报 document不认识,是还要引入什么模块吗?