|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册帐号
×
代码:- <style type="text/css">
- #file{position:absolute;z-index:1;cursor:pointer;opacity:0;}
- #file,.btn_mouseout{background:#6F8EC5;color:#FFF;display:block;line-height:37px;text-align:center;width:100%;}
- #sinaimg{width:50%;padding-bottom: 25px;}
- #sinaimgurl{background: rgba(255, 0, 0, 0);padding: 5px;line-height: 31px;border: 1px solid #ddd;width: 286px;color: #999;border-radius: 4px;}
- #img{text-align: center;width: 100%}
- .upload-drag{
- position: relative;
- padding: 30px;
- border: 1px dashed #e2e2e2;
- background-color: #fff;
- text-align: center;
- cursor: pointer;
- color: #999;
- }
- </style>
- <script type="text/javascript" src="https://www.youngxj.cn/content/templates/emedia_better/bootstrap/bootstrap.min.js"></script>
- <script type="text/javascript" src="https://www.youngxj.cn/content/templates/emedia_better/layer/layer.js"></script>
- <form id="form1">
- <div class="upload-drag" id="upload-drag" onclick="file.click()" title="点击上传图片">
- <img src="https://ww2.sinaimg.cn/large/843dc74bgy1fpkedpgq3tj201c01c0of.jpg">
- <p id="stat">点击上传</p>
- <input type="file" id="file" name="file" onchange="sc();" style="display:none" accept="image/*"/>
- </div>
- </form>
- <div id="img"></div>
- <div id="imgurl"></div>
- <script type="text/javascript" src="https://www.youngxj.cn/content/templates/emedia_better/js/sinaup.js"></script>
复制代码
因为layer.js存在跨域问题,所以最好用自己的 本站也提供 传送门:https://sec.bducds.com/xiaobai-3613-1-1.html
|
|