为了账号安全,请及时绑定邮箱和手机立即绑定

js如何创建<input type="text">?

js如何创建<input type="text">?

拉莫斯之舞 2021-02-14 13:09:22
如果要创建一个<input type="text">应该使用哪条语句?最好能给个实例程序段。谢谢。
查看完整描述

2 回答

?
ibeautiful

TA贡献1993条经验 获得超5个赞

var input = document.createElement('input');input.setAttribute('type''text');

查看完整回答
反对 回复 2021-03-20
  • 2 回答
  • 0 关注
  • 240 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信