阅读背景:

使用Javascript(而不是jQuery!)在多个表单标签上执行字数统计

来源:互联网 

I have multiple labels as part of my form and I'm unable to attach classes to them individually due to the constraints of the system I'm working within and they don't contain IDs. I need to style the labels differently depending on their content, e.g. if it has less than 5 words then I will style it one way, if it has more than 5 words I will style it another. I need to find a way to dynamically add a class to the label depending on whether it has less or more than 5 words.I have multiple labels as part of my form and I




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: