2
任何人都可以幫助我如何在HTA中動態刪除文本框?動態地添加和刪除HTA組件
此代碼增加了動態文本框:
Sub AddTextBox
strHTML = DataArea.InnerHTML strHTML=strHTML&"<tr><td>Source Path</td><td><input type="&Chr(34)& _ "text"&Chr(34)&">"&"</td><td><button type="&Chr(34)&"button"&Chr(34)& _ "onclick="&Chr(34)&"RemoveTextBox"&Chr(34)&">"&"x"&"</button></td></tr>"
DataArea.InnerHTML = strHTML
tabHTML = tabHTML & strHTML
End Sub
您想刪除整個'tr'還是'input'? – Teemu 2013-03-26 07:53:49