Home > Article > WeChat Applet > How to pass values between applet pages
How the mini program transfers values between pages
The mini program provides pages in the page jump API wx.navigateTo How to write value-passing, used between parameters and paths? Separate, parameter keys and values are connected with =, and different parameters are connected with &.
Usage example: Pass value from page A to page B
A page
var txt = 'abc' wx.navigateTo({ url: '../Bpage/index?msg=' + txt })
B page
// 生命周期函数,监听页面加载 onLoad: function(options) { // 获取URL里的参数 var txt = options.txt console.log(txt) }
PHP Chinese website, a large number of free small program development tutorials, welcome to learn!
The above is the detailed content of How to pass values between applet pages. For more information, please follow other related articles on the PHP Chinese website!