随笔分类 - html/CSS
摘要:解决方法:1、页面上放个隐藏的<input type=“file” />2、然后加上一个文本input(type="text")和一个按钮input(type="button")3、点按钮的时候调用<input type=file />的click选择文件4、在<input type=file />
阅读全文
摘要:JS代码 //图像加载出错时的处理 function errorImg(img) { img.src = "默认图片.jpg"; img.onerror = null; } HTML代码 <img width="32" height="32" src="1.jpg" onerror="errorIm
阅读全文