test_universal-links

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        a {
            display: inline-block;
            padding: 15px;
            background: rgb(178, 231, 178)
        }

        .hookCls {
            color: rgb(147, 21, 35);
        }
    </style>
</head>

<body>
    <div id="hookId">see me</div>
    <script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.js"></script>
    <script type="text/javascript">
        function prepareFrame(src) {
            $.ajax({
                url: src,
                data: {},
                success: function() {
                    alert(1);
                },
                error: function() {
                    $('#hookId').addClass('hookCls').html('turn it')
                }
            });
            //window.location.href = src
            return;
            var ifrm = document.createElement("iframe");
            ifrm.setAttribute("src", src);
            ifrm.style.width = "640px";
            ifrm.style.height = "480px";
            document.body.appendChild(ifrm);
        }
        $(function() {
            //prepareFrame('https://olvbpf5y3.qnssl.com/universal-links/tab?index=3');
        })
    //    location.href = ''
    </script>
    <a href="javascript:prepareFrame('https://olvbpf5y3.qnssl.com/universal-links/tab?index=3')">go</a>
    <a href="#" onclick="window.open('https://olvbpf5y3.qnssl.com/universal-links/tab?index=3')">Safari iOS 9 problem case</a>
</body>

</html>

标签: 点击数:584