[JS][Function]Modify Style Class property

修改style的class屬性 by JS

 

<style id=BGstyle>
.BG1{background-Color:blue}
</style>

 

function button1_onclick() {
  window.document.styleSheets[0].rules('BG1').style.backgroundColor='red';
}