function getObjectURL(file) {
var url = null;
if (window.createObjectURL != undefined) { // basic
url = window.createObjectURL(file);
} else if (window.URL != undefined) { // mozilla(firefox)
url = window.URL.createObjectURL(file);
} else if (window.webkitURL != undefined) { // webkit or chrome
url = window.webkitURL.createObjectURL(file);
}
return url;
}
window.getObjectURL = getObjectURL;
$('.gw_upload').on("change", function () {
var objUrl = getObjectURL(this.files[0]);
num--;
console.log(num)
$('.gw_addpz').before('<div class="gw_pz">'+
'<img src=' + objUrl + '>'+
'<span class="gw_pgb">'+'<img src="images/guanbi.png"/>'+'</span>'+
'</div>');
tj();
$('.gw_pxzz').hide();
var url = null;
if (window.createObjectURL != undefined) { // basic
url = window.createObjectURL(file);
} else if (window.URL != undefined) { // mozilla(firefox)
url = window.URL.createObjectURL(file);
} else if (window.webkitURL != undefined) { // webkit or chrome
url = window.webkitURL.createObjectURL(file);
}
return url;
}
window.getObjectURL = getObjectURL;
$('.gw_upload').on("change", function () {
var objUrl = getObjectURL(this.files[0]);
num--;
console.log(num)
$('.gw_addpz').before('<div class="gw_pz">'+
'<img src=' + objUrl + '>'+
'<span class="gw_pgb">'+'<img src="images/guanbi.png"/>'+'</span>'+
'</div>');
tj();
$('.gw_pxzz').hide();
})
// 爱表妹移动端----发表评论上传照片弹出页面