生活在99%以上的信息不是真實的世界 生活中99%以上的信息指向了剩下的信息不是真實的javascript
「HTML DOM」 is a standard. With the "HTML DOM", JavaScript can access and change all the elements of an HTML document.
<body id="b1"></body> //這裏 id 就是 <body> 的 attributes <div> Hello ArthurSlog</div> //這裏 "Hello ArthurSlog" 就是 <div> 的 values,String格式的值
Attribute| Belongs to| Descriptionhtml
accept| <input>| Specifies the types of files that the server accepts (only for type="file")
accept-charset| <form>| Specifies the character encodings that are to be used for the form submission
...| ...| ...vue
Attribute| Descriptionjava
accesskey| Specifies a shortcut key to activate/focus an element
class| Specifies one or more classnames for an element (refers to a class in a style sheet)node
In other words: The "HTML DOM" is a standard for how to get, change, add, or delete HTML elements.
cd ~/Desktop
mkdir node_vue_TemplateSyntax_v-bind_learningload
cd node_vue_TemplateSyntax_v-bind_learningload
npm init
sudo npm install koa koa-static
index.htmlgit
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- 開發環境版本,包含了有幫助的命令行警告 --> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <title>ArthurSlog</title> </head> <body> <div id="app"> <button v-bind:disabled="Output">Hello ArthurSlog</button> </div> <script> new Vue({ el: '#app', data: { Output: true } }) </script> </body> </html>
index.jsgithub
const serve = require('koa-static'); const Koa = require('koa'); const app = new Koa(); // $ GET /package.json app.use(serve('.')); app.listen(3000); console.log('listening on port 3000');
cd ~/Desktop/node_vue_TemplateSyntax_v-bind_learningload
node index.js
index.htmlweb
<body> <div id="app"> <button v-bind:disabled="Output">Hello ArthurSlog</button> </div> <script> new Vue({ el: '#app', data: { Output: true } }) </script> </body>
index.htmlnpm
<button v-bind:disabled="Output">Hello ArthurSlog</button> <script> new Vue({ el: '#app', data: { Output: true } }) </script>
index.htmljson
<button v-bind:disabled="Output">Hello ArthurSlog</button>
index.html
<script> new Vue({ el: '#app', data: { Output: true } }) </script>
index.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <!-- 開發環境版本,包含了有幫助的命令行警告 --> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <title>ArthurSlog</title> </head> <body> <div id="app"> <button v-bind:disabled="Output">Hello ArthurSlog</button> </div> <script> new Vue({ el: '#app', data: { Output: false } }) </script> </body> </html>
cd ~/Desktop/node_vue_TemplateSyntax_v-bind_learningload
node index.js