said the point of what the first, because the company needs, I also began to jump into the pit of small procedures, fill the pit road difficult and miserable, now although there are a lot of pits, but after all the small program to appear soon, the pit is also normal, hahaha no nonsense. It said, passing parameters of small procedures, not much to say, to look at the details.


wxml, a jump page (when available parameters "&")

 < navigator id=1& name=aaa'> url='../index/index? < /navigator> 

or JS navigateTo add a click event, jump pass parameters, effect of two kinds of

 wx.navigateTo ({as url:'../index/index? Id=1& name=aaa', 


js page direct access to

in the onLoad

 onLoad: function (options) {/ / options for the initial page page Jump caused by the parameter var id = 



 page global variables globalData:{id:null 

}: =

 var app = getApp (; 2


 app = VaR value: 

(getApp); VAR id =

three, index

wxml page value list subscript

< pre> < button bindtap='clickMe'data-id='1'> /button>

; click < if you need to pass multiple and can write multiple data-[parameters] way of transmitting

js page

 clickMe:function (E) {var id = console.log (ID);}, 

wxml data-[note: by setting the parameter name] [name] transmission parameters, parameters can only be lowercase, cannot have

#ff0000 > four, form form value

form form value is not simple, for example

summarized above is all the contents of this article, I hope this paper has some reference value of learning to learn or work, if in doubt, you can exchange messages, thank you for your support of the script home.

This paper fixed link: | Script Home | +Copy Link

Article reprint please specify:Examples of several methods to implement the transmission parameters of WeChat small programs | Script Home

You may also be interested in these articles!