|
@@ -40,6 +40,9 @@
|
|
|
background-repeat: no-repeat;
|
|
|
border-radius: 1rem;
|
|
|
}
|
|
|
+ #msform .img-inputTest {
|
|
|
+ text-align: end;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
|
|
@@ -394,19 +397,17 @@
|
|
|
console.log(jsonData.msg);
|
|
|
$(this).prev().val(jsonData.msg);
|
|
|
const nextEl = event.target.nextSibling;
|
|
|
- nextEl.innerHTML = '';
|
|
|
- nextEl.textContent = '上傳檔案';
|
|
|
nextEl.style.backgroundImage = `url(http://${jsonData.msg})`;
|
|
|
// nextEl.style.backgroundImage = `url(https://cdn2.ettoday.net/images/6017/d6017847.jpg)`;
|
|
|
// nextEl.nextSibling.classList.add('box-active');
|
|
|
// nextEl.nextSibling.style.backgroundImage = `url(http://${jsonData.msg})`;
|
|
|
//console.log($(this).next());
|
|
|
- //$(this).next().html('上傳檔案');
|
|
|
+ //$(this).next().html('');
|
|
|
//$(this).next().text('上傳檔案');
|
|
|
},
|
|
|
error: function (error) {
|
|
|
- event.target.nextSibling.nextSibling.innerHTML = '';
|
|
|
- event.target.nextSibling.nextSibling.textContent = '上傳檔案';
|
|
|
+ const nextEl = event.target.nextSibling;
|
|
|
+ nextEl.style.backgroundImage = `url(./img/upload_img.png)`;
|
|
|
alert('圖片錯誤');
|
|
|
}
|
|
|
});
|
|
@@ -727,7 +728,6 @@
|
|
|
var imguploadlabel = document.createElement("label");
|
|
|
imguploadlabel.setAttribute('for', `img${i}`);
|
|
|
imguploadlabel.classList.add('upload-btn');
|
|
|
- imguploadlabel.textContent = '上傳圖片';
|
|
|
imguploadlabel.setAttribute('set-lan', `html:upload_file`);
|
|
|
img_box.appendChild(imguploadlabel);
|
|
|
imgupload.addEventListener('change', prepareUpload);
|