Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the methods for WeChat Mini Programs js to accept the value passed on the page?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains the "WeChat Mini Programs js to accept the page value of what are the methods", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "WeChat Mini Programs js to accept page value transfer methods there are" it!

1. The parameter name of this page is local variable: onLoad: function (options) {var this page parameter name = options. Parameter name of the previous value page}

Example:

OnLoad: function (options) {

Var shopsName=options.shopsName

}

two。 The parameter name of this page is the global variable: onLoad: function (options) {the parameter name of this page = options. Parameter name of the previous value page}

Example:

OnLoad: function (options) {

This.data.shopsName=options.shopsName

}

Attachment: no matter whether the previous page is passed through js or wxml, the value method of this page is the same as above.

Thank you for your reading, the above is the content of "WeChat Mini Programs js accepts page value transfer method?" after the study of this article, I believe you have a deeper understanding of what WeChat Mini Programs js accepts page value transfer method has, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report