Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过二维码发布下载地址 #38

Open
dalaolala opened this issue Dec 5, 2021 · 0 comments
Open

通过二维码发布下载地址 #38

dalaolala opened this issue Dec 5, 2021 · 0 comments

Comments

@dalaolala
Copy link
Owner

dalaolala commented Dec 5, 2021

完整的代码如下

 <html>

<head>
<title>我的第一个 HTML 页面</title>


<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/layer/3.5.1/layer.js"></script>

 <script type="text/javascript">
  function share(){  
                $("#testimg").attr("src","https://api.pwmqr.com/qrcode/create/?url=https://www.baidu.com");
                layer.open({
                      type: 1,
                      skin: '', //样式类名
                      title:false,
                      offset: 'auto',
                      area: ['300px', '300px'], //宽高
                      closeBtn: 1, //不显示关闭按钮
                      shade: 0,
                      anim: 2,
                      shadeClose: true, //开启遮罩关闭
                      content: $("#shareDiv")
                    });

            }

 </script>


</head>

<body>
	 <div style="font-size: 0.2rem;text-align: center;" onclick="share()">
                     点我点我来下载吧
                    </div>
                    <div class="social-share1" style="text-align:center; display:none;" id="shareDiv">
                    <img id="testimg" style="float:right;cursor:pointer" alt="" width="300" height="300"/>  
                    </div> 


</body>

</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant