jquery如何给textarea添加背景颜色
1、新建一个html文件,命名为test.html,用于讲解jquery如何给textarea添加背景颜色。

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

5、在js标签内,创建addBg函数,通过id获得textarea对象,使用css()方法设置background属性为yellow,即设置textarea的背景颜色为黄色。

1、新建一个html文件,命名为test.html,用于讲解jquery如何给textarea添加背景颜色。
3、在test.html文件内,设置textarea标签的id为myway。
5、在js标签内,创建addBg函数,通过id获得textarea对象,使用css()方法设置background属性为yellow,即设置textarea的背景颜色为黄色。