哪位大神知道我写的vue返回上一页代码哪里错了
<!DOCTYPE html> <meta charset="utf-8"/> <html> <script src="vue.js"></script> <script src="vue-router.js"></script> <body> <div id="app"> <button @click="goback">goback</button> </div> </body> <script> var app = new Vue({ el:"#app", data:{ }, methods:{ goback:function(){ this.$router.go(-1); } } }) </script> </html>#前端##JavaScript#