I have successfully stored a base64 image to the local storage.
I have tried and failed in adding the stored value to an input file field.
document.getElementsByName("inputfieldname")[0].setAttribute("value", getSavedValue("thesavedkey"));
<input type="file" name="inputfieldname">
由于存在旧版安全漏洞,因此无法以这种方式为file
类型输入设置值。
document.getElementById('mytext').value = = window.sessionStorage.getItem('user')
尝试以上之一。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.