Home > front end > Axios get request to the input input values to the background
Axios get request to the input input values to the background
Time:09-18
My train of thought is the parameter to the URL but not get inside, the background is the servlet
CodePudding user response:
Simple way to 'http://address? Hi='+ this input
CodePudding user response:
Axios request is right, but haven't seen you such a vue grammar, good advice about the use of vue To obtain input values can be placed in mounted
CodePudding user response:
This. Input to find the input data of the Vue instance, found that can't find, you should be here directly with the input rather than this. The input, or directly with v - the value of the input model binding & lt; Input the id="input" type="text" v - model="info. The name"/& gt; , only the user input will be directly stored in the data inside Info. Name, then params become params: {hi: this. Info. Name}