1、新建一个html文件,命名为demo3.html,用于讲解Javascript怎么为标签添加样式。
2、使用document对象的createAttribute方法为标签添加样式。
3、运行网页,查看结果。