当前位置:网站首页>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
边栏推荐
- View partition table format
- [Openstack] keystone,nova
- Why do I delete the original record (OP d) and then add a new one in Kafka when I update MySQL data
- [deep learning CPU (part outside) - virtual memory]
- Rhel8 patch package production
- Asp. Net MVC, how can the controller in the folder jump to the controller in the root directory?
- UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x90 in position 614: ordinal not in range(128)
- Function pointer and callback function
- 一个公司的面试笔记
- "Weilai Cup" 2022 Niuke summer multi school training camp 2H
猜你喜欢

STM32F103ZET6程序移植为C8T6+C8T6下载程序flash timeout的解决方案

Mmdetection preliminary use

Basic configuration of BGP - establish peers and route announcements

Note: restframe work records many to one tables, how to serialize in that table (reverse query)

Some problems about pointers
![[Openstack] keystone,nova](/img/de/70b654a29a813c8fe828c4018bd4e7.png)
[Openstack] keystone,nova

数据挖掘——关联分析基础介绍(上)

C语言实现三子棋游戏(详解)

Function pointer and callback function

How to solve the problem of store ranking?
随机推荐
力扣面试题17.04 消失的数字||260.只出现一次的数字(内含位运算知识点)
"Weilai Cup" 2022 Niuke summer multi school training camp 2H
Data mining -- Introduction to the basis of association analysis (Part 1)
Value transmission and address transmission of C language, pointer of pointer
%s. %c, character constant, string constant, const char*, pointer array, string array summary
First ALV program 2
有没有大佬帮我看下flink sql连接kafka认证kerberos的参数配置是否有误
大佬们flink的JDBC SQL Connector现在不支持所有的数据库吗,例如vertica?
Codeforces Round #810 (Div. 2) D. Rain (线段树差分)
Lucifer 98 life record ing
伏英娜:元宇宙就是新一代互联网!
一个公司的面试笔记
企业网的三层架构
路由 知识
Opensql quick learning
A little understanding of pointer, secondary pointer, wild pointer, pointer as function return value
When defining an array, the size must be constant
There is a special cryptology language called asn.1
3. Solve pychart's error unresolved reference 'selenium' unresolved reference 'webdriver‘
LCA board