### [如何实现微信小程序url传值](https://www.prosaas.cn/article/16656) **Published:** 2020-06-10T06:23:46 **Author:** 5201314 **Excerpt:** 如何实现微信小程序url传值?1:将参数加在url后面2:在onload里面获取 3:获取使用相关推荐:小程序… ![](https://img.php.cn/upload/article/000/000/049/5ee07a0749b13348.jpg) **如何实现微信小程序url传值?** 1:将参数加在url后面 ![](https://img.php.cn/upload/image/709/835/763/1591769694653814.png) 2:在onload里面获取 ![](https://img.php.cn/upload/image/405/217/144/1591769717639405.png) onLoad: function (options) { var that = this; var id = options.id //获取值 that.id = id var class\_id = options.class\_id //在这个地方指定 that.class\_id = class\_id var position = options.position that.position = position that.getSubject(); }, 3:获取使用 ![](https://img.php.cn/upload/image/370/150/968/1591769731863591.png) 相关推荐:小程序教程 以上就是如何实现微信小程序url传值的详细内容,更多请关注知企PROSAAS其它相关文章! **Tags:** 微信小程序 **Categories:** 后端开发 ---