js如何设置textarea的class属性
1、新建一个html文件,命名为test.html,用于讲解js如何设置textarea的class属性。

2、在test.html文件内,使用textarea标签创建一个文本域,用于测试。

3、在test.html文件内,设置textarea标签的id为eetwo。

4、在test.html文件内,创建script标签,用于编写js代码。

5、在js标签内,通过id获得textarea对象,使用setAttribute方法设醅呓择锗置textarea的class属性值为mycc。

6、在浏览器打开test.html文件,查看结果。
