1 Star 0 Fork 0

rick_鼠标手 / 打飞机

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Text.js 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
Dengwc 提交于 2018-03-03 16:01 . 打飞机小game
var Text;
(function(){
Text = function(){
}
Text.prototype.init=function()
{
Text.prototype.createDIvText();
}
Text.prototype.createDIvText=function()
{
var text = document.createElement("div")
text.setAttribute("style","height:60px;line-height:60px;background:#333;position:absolute;width:100%;font-size:14px;color:white;text-align:center;z-index:999;-moz-opacity:0.8; -webkit-opacity:0.8; opacity:0.8; filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=80);")
Text.prototype.createInputText(text,"击中",JZ)
Text.prototype.createInputText(text,"得分",DF)
Text.prototype.createInputText(text,"丢失",DS)
Text.prototype.createInputText(text,"计时",JS)
OBODY.appendChild(text);
}
Text.prototype.createInputText=function(div,str,id)
{
var textInput = document.createElement("input")
var textSpan = document.createElement("span")
textInput.setAttribute("id",id)
textInput.setAttribute("value","")
textInput.setAttribute("style","border:1px solid #ccc;background:white;margin-rig ht:10px;width:100px;height:30px;line-height:30px;margin-top:15px;padding-left:4px;color:#666")
textSpan.innerHTML=str;
textSpan.setAttribute("style","margin-right:4px;")
div.appendChild(textSpan);
div.appendChild(textInput);
}
})();
1
https://gitee.com/dengwc/hit_a_plane.git
git@gitee.com:dengwc/hit_a_plane.git
dengwc
hit_a_plane
打飞机
master

搜索帮助