我想将input里的字段发送给后端,但是我在network里的请求中没有看到id这个字段?不知道是不是发送成功了
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id="search">
<input type="text" v-model='input'>
<button @click='getData'>查询</button>
<div class="msg">{{msg}}</div>
</div>
</body>
<script src='vue.js'></script>
<script src='vue-resource.js'></script>
<script>
new Vue({
el:"#search",
data:{
input:"",
msg:""
},
methods:{
getData(){
this.$http.get("test.json",{id:this.input}).then(res=>{
console.log(res.data)
this.msg=res.data
})
}
}
})
</script>
</html>