随笔分类 -  html/CSS

摘要:解决方法:1、页面上放个隐藏的<input type=“file” />2、然后加上一个文本input(type="text")和一个按钮input(type="button")3、点按钮的时候调用<input type=file />的click选择文件4、在<input type=file /> 阅读全文
posted @ 2016-03-01 09:50 皈依之路 阅读(2627) 评论(0) 推荐(0)
摘要:JS代码 //图像加载出错时的处理 function errorImg(img) { img.src = "默认图片.jpg"; img.onerror = null; } HTML代码 <img width="32" height="32" src="1.jpg" onerror="errorIm 阅读全文
posted @ 2016-02-29 23:14 皈依之路 阅读(510) 评论(0) 推荐(0)