Different instance analysis of BindInput and BindSubmit

The instance of this paper tells the difference between the WeChat applet BindInput and BINDSUBMIT. Share to everyone for your reference, specifically,

In fact, BindInput has bindSubmit if there is no comparability, but the two are often compared together, why?

For example, a simple search box, are you willing to choose to use BindInput or use bindSubmit? Although one is a form, one is a text input box, but both have a common point, which is to get the user’s input information. At this time, the problem is coming, where is it?

The simplest code is below:

 Submit button           
It is very simple, then the problem is coming, where is it? Of course, there is only one for temporary differences, that is, more, haha, joking. According to the reactions of customers over Shenzhen, when using INPUT, after moving the cursor to a place, enter a text, will reconnect the cursor.The tail, of course, not the above code, the above code is no problem
There is a problem with the following code:
// Pages /input/input.jspage ({data: {INPUT1: “this is the value for input1”, input: “this is the value for input2”}}} {console.log (e) {console.log (e); console. Log (e.detail.value.input1); this.setdata ({INPUT1: E.Detail.Value.input1})}}}}}}}}}}}}}}}}}}}}}}} {Console.log (e); console.log (E.Detail .Value); this.SetData ({INPUT2: E.Detail.Value})}}

 Submit button   
In fact, it is very simple, In one place, it is to refresh the interface
this.SetData , why? Because you refresh, the value value is modified, then?
  Then the page is refreshed, then? Then because you set the cursor automatically to the last step, the best is to be careful when using INPUT, of course, I don't mean that INPUT is not using Submit, just adapting to the scene, such as no need Use bindinWhen PUT is time to refresh the interface, or say that I personally prefer to use BindsBmit,.   I hope this article will help the WeChat applet development.  
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment