我需要自定義個字符串 比如(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 關注
- 707 瀏覽
添加回答
舉報
0/150
提交
取消