zoukankan      html  css  js  c++  java
  • MUI 页面传值,因为用的是H5+ plus方法所以要在真机上才能测试出效果

    页面a.html

    <!doctype html>
    <html>
    
        <head>
            <meta charset="UTF-8">
            <title></title>
            <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
            <link href="css/mui.min.css" rel="stylesheet" />
        </head>
    
        <body>
            <div class="class">
                <div class="class1" onclick="jump()">传参,传参,传参<br/>传参,传参,传参<br/>传参,传参,传参</div>
            </div>
            <script src=" js/mui.min.js "></script>
            <script type="text/javascript ">
                mui.init();
                var newid = 5;
    
                function jump() {
                    mui.openWindow({
                        id: "yingshou",
                        url: "b.html",
                        extras: {
                            a: 1,
                            b: 2,
                            c: 3,
                            d: 888
                        }
                    })
                }
            </script>
        </body>
    
    </html>

    页面b.html

    <!doctype html>
    <html>
    
        <head>
            <meta charset="UTF-8">
            <title></title>
            <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
            <link href="css/mui.min.css" rel="stylesheet" />
        </head>
    
        <body><br /><br /><br /><br />
            <a href="a.html">
                << 返回 </a><br /><br /><br /><br />
                <div id="v"></div>
                    <script src="js/mui.min.js"></script>
                    <script type="text/javascript">
                        mui.init();
                        mui.plusReady(function() {
                            var self = plus.webview.currentWebview();
                            var a = self.a;
                            var b = self.b;
                            var c = self.c;
                            var d = self.d;
                            document.getElementById("v").innerHTML = a + " : " + b + " : " + c + " : " + d;
                        });
                    </script>
        </body>
    
    </html>

    测试过完全可用。

  • 相关阅读:
    TensorFlow---基础---GFile
    TensorFlow---image recognition--classify_image运行、文件说明与错误(路径)解决
    gcc -D
    c语言数据读入---sscanf、fscanf
    Mysql--视图
    Mysql的索引
    每天学点linux命令之nc
    Redis基础---链接管理
    iOS WKWebview 网页开发适配指南
    Win7/Win10下搭建Go语言开发环境
  • 原文地址:https://www.cnblogs.com/AlbertSmith/p/7838839.html
Copyright © 2011-2022 走看看