页面A
<div class="mui-content">
<button type="button" class="mui-btn" onclick="openWindow();">点击这里打开新窗口</button>
</div>
<script type="text/javascript">
function openWindow(){
mui.openWindow({
url : 'test.html',
extras : {'name':'小明', 'age':18}
});
}
</script>
页面B
<div class="mui-content">
<div>姓名 : <span id="name"></span></div>
<div>年龄 : <span id="age"></span></div>
</div>
</body>
<script type="text/javascript">
mui.init();
mui.plusReady(function(){
var sData = plus.webview.currentWebview();
var nameObj = mui('#name');
nameObj[0].innerHTML = sData.name;
var ageObj = mui('#age');
// ageObj[0].innerHTML = sData.age;
});
</script>
总是无法获取到传值 怎么办呢
8***@qq.com (作者)
多谢指点!
2016-09-23 09:19