我需要自定义个字符串 比如(1,2,3,4),最终替换成<input type="text" id="text1" width height / > 1,2,3,4 分别是 类型 id 长 和 宽 因为不确定有多少个input 最终 我想在用到input的地方直接写那个字符串就行了 大神给给个建议
1 回答
慕婉清6462132
TA贡献1804条经验 获得超2个赞
//o:input的父级,t你的1,2,3,4 function ReturnInputHtml(o,t) { o.append('<input type="' + t + '" id="' + t + '" width="' + t * 10 + '" height="' + t * 20 + '" />'); }
- 1 回答
- 0 关注
- 686 浏览
添加回答
举报
0/150
提交
取消