![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端
ChampAignSeven
Java小白@
展开
-
前端 js颜色格式转换
将rgb(xxx,xxx,xxx)转换为 #xxxxxxfunction rgb2hex(sRGB) { var hex = function(n){ return n < 16 ? '0' + (+n).toString(16) : (+n).toString(16); } return sRGB.replace(/^rgb\((\d+)\,\s*(\d+)\,\s*(\d+)\)$/g, fu原创 2020-05-30 19:39:41 · 530 阅读 · 0 评论 -
图片上传预览功能 js实现
html 部分<div class="file-upload"> <div class="upload-button upload-area"> <button class="btn btn-default btn-small fileinput-button upload_file_btn" id="uploadImg">上传文件</button> <form id="uploadForm" enctype="multipart/form-原创 2020-05-30 19:37:41 · 245 阅读 · 0 评论