<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>Hello world</title><scripttype="text/javascript"src="./vue.js"></script></head><body><divid="app">{
{content}}</div></body><scripttype="text/javascript">var vue = new Vue({
el : '#app',
data : {
content:'hello world 世界你好'
}
});
</script></html>
<scripttype="text/javascript">var app = new Vue({
el : '#app',
data : {
content:'hello world 世界你好'
}
});
//定时任务
setTimeout(function() {
app.$data.content = 'I like java';
},