随笔分类 - Html
摘要:在浏览器中使用截图工具截图后直接粘贴到页面上传,以及拖拽到页面标签区域上传 主要使用了粘贴(paste)事件,以及拖拽(drag)事件,其中拖拽时要禁用浏览器的默认将图片打开的行为 例子: HTML部分: js部分: 调用: 后端保存图片部分代码: demo源码下载地址:链接:https://pan
阅读全文
摘要:判断浏览器是否支持localStorage可以使用下面的代码:if(window.localStorage){ alert("支持localStorage") }else{ alert("暂不支持localStorage") } //或者 if(typeof window.localStorage
阅读全文
摘要:在浏览器标签窗口添加 图片,要实现下图 箭头 所标的效果: 实现方法: 在页面的头部加上这句代码 <link rel="shortcut icon" href="Images/titleLog.ico" /> 其中 href是图片的路径 完整代码: 1 <!DOCTYPE html> 2 <html
阅读全文
摘要:例子: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.
阅读全文
摘要:两种方法: 后端的一般处理程序:Imge.ashx 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.UI.WebContro
阅读全文

浙公网安备 33010602011771号