开发者

How to add class to dynamically generated text box in DOM?

I created a textbox using Javascript.

How to assign class to text开发者_C百科box in Javascript?


Assuming you have a reference to your text-box node, you can just assign a CSS class by setting the className property on the node, like:

myTextBox.className = "someClass";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜