JS实现本地预览上传图片并获取宽高
摘要:<input type="file" accept="image/jpg,image/jpeg,image/png" name="file" onchange="selectImg(this)"> <br> <img id="showImg" src="" alt="" width=""> func
阅读全文
posted @
2022-11-15 09:25
limonyun
阅读(1368)
推荐(0)
js localStorage
摘要:function get_user() { return localStorage.getItem("token") || 0;} function set_user(token) { localStorage.setItem('token',token)}
阅读全文
posted @
2022-05-19 17:14
limonyun
阅读(58)
推荐(0)
clipboard复制隐藏域
摘要:<div style="text-align: center;font-size: 0.213333rem;" class="btn" link-url="http://www.baidu.com">点我复制分享链接</div> <script type="text/javascript"> win
阅读全文
posted @
2021-12-19 14:59
limonyun
阅读(122)
推荐(0)
h5压缩图片并生成base64
摘要:function base64ThumbImage(elementObj,maxWidth,maxHeight){ if (typeof (FileReader) 'undefined') { alert("抱歉,你的浏览器不支持发送图片,请升级浏览器或切换浏览器再试!"); } else { tr
阅读全文
posted @
2021-12-14 17:01
limonyun
阅读(491)
推荐(0)
h5只调用摄像头不调用相册
摘要:<input type="file" accept="image/*" id="demo_input" capture="camera" />
阅读全文
posted @
2021-12-13 23:11
limonyun
阅读(357)
推荐(0)