当前位置:网站首页>Wechat applet parameter transfer
Wechat applet parameter transfer
2022-07-29 04:11:00 【Arvin L】
1,navigator When jumping
wxml page ( Available when there are many parameters “&”)
1 |
|
Or add a click event ,js use navigateTo Jump and pass parameters , The two effects are the same
wx.navigateTo({
url: '../index/index?id=1&name=aaa',
})js page stay onLoad Get directly from
onLoad: function (options) {
// Page initialization options Parameters for page Jump
var id = options.id // Get value
},2. Global variables
app.js page
globalData:{
id:null
} assignment :
var app = getApp(); app.globalData.id = 2
Value :
var app = getApp(); var id = app.globalData.id
3. list index Subscript value
wxml page
1 |
|
If you need to pass more than one , Can write multiple data-[ Parameters ] The way to deliver
js page
1 2 3 4 |
|
Be careful : adopt wxml Set up data-[ Parameter name ] Pass parameters ,[ Parameter name ] It can only be lowercase , It can't be capitalized
4.form Form transfer value
form Form value transfer is relatively simple and commonly used , No more examples
边栏推荐
- 3. Solve pychart's error unresolved reference 'selenium' unresolved reference 'webdriver‘
- LCA 板子
- Problems encountered in vscode connection SSH
- 大佬们flink的JDBC SQL Connector现在不支持所有的数据库吗,例如vertica?
- MySQL第四篇(完结)
- Object array merges elements according to a field
- 信号处理中的反傅里叶变换(IFFT)原理
- 请问为什么我进行mysql数据update时,kafka中采集到的是先删除原纪录(op d)再新增新
- UCOS task switching process
- Const read only variable constant
猜你喜欢

Design of environment detection system based on STM32 and Alibaba cloud

Lvs+keepalived high availability deployment practical application

HCIP BGP

Configmap configuration and secret encryption

LDP -- label distribution protocol

MPU6050

Compilation and linking

SVG--loading动画

Press the missing number of interview question 17.04 | | 260. the number that appears only once (including bit operation knowledge points)
![[BGP] small scale experiment](/img/58/877e5e454e9bab9d1bccb8fdd3b04d.png)
[BGP] small scale experiment
随机推荐
MPU6050
[introduction to C language] zzulioj 1031-1035
Is the browser multi process or single process?
开课!看smardaten如何分解复杂业务场景
How to execute insert into select from job in SQL client
[untitled]
%s. %c, character constant, string constant, const char*, pointer array, string array summary
Ma Zhixing entered the mass production of front loading, starting with the self-developed domain controller?
HCIP BGP
安装ros的laser_scan_matche库所遇到的问题(一)
[principle] several ways of horizontal penetration
[Openstack] keystone,nova
Solution: module 'xlrd' has no attribute 'open_ Error reporting of workbook '
面试必备!TCP协议经典十五连问!
When defining an array, the size must be constant
Codeforces Round #810 (Div. 2) D. Rain (线段树差分)
编译与链接
Don't the JDBC SQL connector of the big guys Flink now support all databases, such as vertica?
How to write the filter conditions of data integration and what syntax to use? SQL syntax processing bizdate can not be
初识C语言(3)