Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/425.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何解决未检测到vuejs的问题_Javascript_Html_Vue.js - Fatal编程技术网

Javascript 如何解决未检测到vuejs的问题

Javascript 如何解决未检测到vuejs的问题,javascript,html,vue.js,Javascript,Html,Vue.js,quand j'execute index.html j obtient{{name}toujours vuejs est non detecté <html> <head> <meta charset="UTF-8" /> <title>learn vuejs</title> <link rel="shortcut icon" href="#

quand j'execute index.html j obtient{{name}toujours vuejs est non detecté

<html>
  <head>
    <meta charset="UTF-8" />
    
    <title>learn vuejs</title>
    <link rel="shortcut icon" href="#" />
  </head>
  <body>
    
    <div id="j">{{ name }}</div>
    <script src="js/vue.min.js"></script>
    <script >
new Vue({
  ele: "#j",
  data: {
    name: "welcome to vue",
  },
});</script>
  </body>

学习vuejs
{{name}}
新Vue({
ele:“j”,
数据:{
名称:“欢迎来到vue”,
},
});
刚刚使用了以下代码:

newvue({
el:“j”,
数据:{
名称:“欢迎来到vue”,
},
})

不要使用
ele
,只需使用
el

即可设置事件侦听器:

document.addEventListener('DOMContentLoaded', function () {
  new Vue({
    el: '#j',
    // define data - initial display text
    data: {
      name: "welcome to vue",
    }
  })
})

我建议你先来。另外,请在StackOverflow上坚持使用英语。我很高兴听到这个消息