当前位置:网站首页>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
边栏推荐
- 店铺排名问题,如何解决?
- Communication between parent-child components and parent-child components provide and inject
- Lua language (stm32+2g/4g module) and C language (stm32+esp8266) methods of extracting relevant data from strings - collation
- Data mining -- Introduction to the basis of association analysis (Part 1)
- Safari's compatibility with Z-index
- How to set the SQL execution timeout for flick SQL
- Install the laser of ROS_ scan_ Problems encountered in match library (I)
- Rhel8 patch package production
- LCA board
- 关于双指针的思想总结
猜你喜欢

HCIP BGP

Data mining -- code implementation of association analysis example (Part 2)
![[paper translation] vectornet: encoding HD maps and agent dynamics from vectorized representation](/img/4b/150689d5e4809ae66a4297915ecd0c.png)
[paper translation] vectornet: encoding HD maps and agent dynamics from vectorized representation

UCOS task switching process

nacos注册中心

Blood cases caused by < meta charset=UTF-8> -- Analysis of common character codes

First knowledge of C language (3)

Zhihuijun, a genius of Huawei, made a modular mechanical keyboard, which caused an earthquake in the geek circle. Netizens: This is the real customization

编译与链接

Ssl== certificate related concepts
随机推荐
Solution: module 'xlrd' has no attribute 'open_ Error reporting of workbook '
mmdetection初步使用
MySQL Part 4 (end)
谁能详细说下mysqlRC下的半一致读和怎么样减少死锁概率?
C declaration and initialization and assignment
“蔚来杯“2022牛客暑期多校训练营2 H
The table of antd hides the pager when there is only one page
LCA board
Pointer variables -printf%d and%p meaning
3. Solve pychart's error unresolved reference 'selenium' unresolved reference 'webdriver‘
Blood cases caused by < meta charset=UTF-8> -- Analysis of common character codes
Database SQL statement realizes function query of data decomposition
Is the browser multi process or single process?
"Weilai Cup" 2022 Niuke summer multi school training camp 2H
SQL server当存储过程接收的参数是int类型时,如何做判断?
Ssl== certificate related concepts
【BGP】小型实验
LCA 板子
[kvm] common commands
How to execute insert into select from job in SQL client