这个新手系列的作者是苏桃子,来自他的博客:http://www.cnblogs.com/simba-lkj
微信小程序之跨界面传参
微信小程序在两个之间传参类似js传递url拼接参数,举个例子来说吧
input自己设置参数
-
//index.wxml
-
<form bindsubmit="formSubmit" bindreset="formReset" class="myform">
-
<text class="prompt">给自己起个名字吧</text>
-
<input placeholder="给自己起个名字吧" name="uesrname"/>
-
<!--<navigator url="../logs/logs?title=我是index" >跳转到新页面</navigator> 之间传参-->
-
<!--<navigator url="../logs/logs?title=我是index" redirect>在当前页打开</navigator> -->
-
<button form-type="submit" type="primary" size="mini">确定</button>
-
<button form-type="reset" type="warn" size="mini">重置</button>
-
</form>
-
formSubmit:function(e){
-
var da = e.detail.value;
-
var qu = da.uesrname;
-
this.setData({
|