0
如何在编程创建的文本框上放置onblur和onfocus属性?设置以编程方式创建的文本框的onblur和onfocus属性?
这里是我的代码 -
td = New HtmlTableCell
td.Style.Add("padding-bottom", "5px")
Dim txtbox As New TextBox
txtbox.Style.Add("width", "96%")
txtbox.ID = "ename"
td.Controls.Add(txtbox)
tr.Cells.Add(td)
td.Style.Add("padding-top", "5px")
现在,我想补充的onblur和聚焦状态。有没有像? -
txtbox.attributes.Add("onblur","Enter Name")
txtbox.attributes.Add("onfocus","")
我试过这个,不起作用。有谁知道如何做到这一点?