zoukankan      html  css  js  c++  java
  • vue.js表单提交

    <!DOCTYPE html> 
    <html lang="en"> 
        <head> 
            <meta charset="UTF-8"> 
            <title>helloform_Vue</title> 
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
            <script src="./vue.js"></script> 
        </head> 
        <body> 
        <div class="hello"> 
            <ul> 
                <form @submit.prevent="submit"> 
                    <input type="text" name="name" v-model="inputtext.name"> 
                    <input type="password" name="password" v-model="inputtext.password"> 
                    <input type="submit" value="提交"> 
                </form> 
            </ul> 
        </div> 
        <script> 
            var vm = new Vue({ 
                el: '.hello', 
                data: { 
                     
                    inputtext:{} 
                }, 
                methods: { 
                    submit: function() { 
                        console.log(this.inputtext); 
                    } 
                }, 
            }) 
        </script> 
     
        </body> 
    </html> 

  • 相关阅读:
    nginx 命令
    nginx 配置文件(windows)
    nginx 配置文件(linux)
    nginx 安装
    什么是REST架构
    名词解释
    建造者模式
    单例模式
    工厂模式
    赋值运算符,拷贝构造函数,clone()方法总结
  • 原文地址:https://www.cnblogs.com/gerry/p/7717737.html
Copyright © 2011-2022 走看看