标签:utf-8 hang function res span label pos change ada
<label> <div class="myusercenter-image-none"> <img src="" class="myusercenter-image" alt=""> <input type="file" class="myusercenter-hard-img"> </div> </label>
// 上传头像 $(function() { $(‘.myusercenter-hard-img‘).on(‘change‘, function(e) { var files = e.target.files; var reader = new FileReader(); reader.readAsDataURL(files[0], "UTF-8"); reader.onload = function(evt) { var fileString = evt.target.result; var date = { "file": fileString }; $(‘.myusercenter-image‘).attr(‘src‘, fileString); console.log(fileString) // $.post("", date).success(function (result) { // alert("ok"); // }); } }) })
标签:utf-8 hang function res span label pos change ada
原文地址:https://www.cnblogs.com/chen527/p/9591697.html