• 为什么选性别会导致兴趣都选中-vue


    为什么选性别会导致兴趣都选中-vue

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>
    <html lang="zh-CN">
    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <base href="<%=basePath%>">
    
    <title>Vue index</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    
    <!-- Bootstrap core CSS -->
    <link href="js/b/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="css/jumbotron.css" rel="stylesheet">
    
    <script src="js/vue.js"></script>
    </head>
    
    <body>
    <div class='container' id="example">
    <form>
    姓名:
    <input type="text" v-model="data.name" placeholder="">
    <br />
    性别:
    <input type="radio" id="man" name="gender" value="One" v-model="data.sex"> 
    <label for="man" ></label>
    <input type="radio" id="male" name="gender" value="Two" v-model="data.sex" >
    <label for="male"></label>
    <br />
    兴趣:
    <input type="checkbox" id="book" value="book" v-model="data.intrerest" >
    <label for="book">阅读</label>
    <input type="checkbox" id="swim" value="swim" v-model="data.intrerest" >
    <label for="swim">swim</label>
    <input type="checkbox" id="game" value="game" v-model="data.intrerest" >
    <label for="game">game</label>
    <input type="checkbox" id="song" value="song" v-model="data.intrerest" >
    <label for="song">song</label>
    <br />
    身份:
    <select v-model="data.identity">
        <option value="teacher" selected>教师</option>
        <option value="doctor" >医生</option>
        <option value="lawyer" >律师</option>
    </select>
    </form>
    </div>
    
    <script type="text/javascript">
        new Vue({
            el:"#example",
            data:{
                data:{
                    name:"",
                    sex:"",
                    interest:[],
                    identity:""
                }
            }
        });
    </script>
    </body>
    </html>

    为什么呢?

  • 相关阅读:
    一个Java对象到底占用多大内存
    Java 动态代理机制分析及扩展
    JVM内幕:Java虚拟机详解
    深度分析 Java 的 ClassLoader 机制(源码级别)
    Java异常的深入研究与分析
    HashMap的工作原理
    Java枚举常见7种用法
    left join 过滤条件写在on后面和写在where 后面的区别
    mysql left( right ) join使用on 与where 筛选的差异
    SQL索引优化
  • 原文地址:https://www.cnblogs.com/stono/p/6884021.html
Copyright © 2020-2023  润新知