<div id="app"> <p>{{hello}}</p> <button @click="click">反转信息</button> </div>
To write the contents (content inversion) within <p> tags;
<Button> button, a click event to write
< Script > new new Vue ({ EL: " #app " , Data: { Hello: ' I'm afraid you afraid I ' }, Methods: { the Click: function () { the this .hello = the this .hello.split ( '' ) . .reverse () the Join ( '' ) // character inverts; } } }) </ Script >