怎么改变背景颜色

0

<!doctype html> <html> <head> <meta charset="utf-8"> <title>template - local var</title> <script type="text/javascript" src="lib/system@0.16.11.js"></script> <script type="text/javascript" src="lib/angular2.dev.js"></script> <script type="text/javascript" src="lib/system.config.js"></script> </head> <body> <ez-app></ez-app>

&lt;script type="module">
    import {Component,View,bootstrap} from "angular2/angular2";

    @Component({selector:"ez-app"})
    @View({
        template:`    
            &lt;h1>
                &lt;button (click)="changecolor()">变色&lt;/button>
                I choose 
                &lt;b #v_who>WHO?&lt;/b>
            &lt;/h1>
            &lt;button (click)="v_who.textContent = 'Jason'">Jason&lt;/button>
            &lt;button (click)="v_who.textContent = 'Mary'">Mary&lt;/button>
            &lt;button (click)="v_who.textContent = 'Linda'">Linda&lt;/button>
            &lt;button (click)="v_who.textContent = 'Lincoln'">Lincoln&lt;/button>
            &lt;button (click)="v_who.textContent = 'Jimmy'">Jimmy&lt;/button>
            &lt;button (click)="v_who.textContent = 'Albert'">Albert&lt;/button>
           `
    })
    class EzApp{
        constructor(){
            this.changecolor();
        }
        changecolor(){

        }
    }

    bootstrap(EzApp);

&lt;/script>

</body> </html>

立刻升级为会员,去除全部广告!