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> 

  • 相关阅读:
    The Stanford Natural Language Processing Group
    HTTP和Socket
    数据挖掘之R与SQL
    redis运维的一些知识点
    ICTCLAS2011免费发布
    异步IO一定更好吗?
    试用wincvs2.0
    本地访问服务器上的wamp
    如何解决wamp中apache外部IP访问问题
    高级设置电脑系统windows7防火墙出错代码0×6D9原因与解决技巧
  • 原文地址:https://www.cnblogs.com/gerry/p/7717737.html
Copyright © 2011-2022 走看看