事件
摘要:一 事件类型 1.文档事件 (1)beforeunload beforeunload事件当窗口将要关闭,或者document和网页资源将 要卸载时触发。它可以用来防止用户不当心关闭网页。 window.onbeforeunload = function() { if (textarea.value
阅读全文
事件处理
摘要:1) html事件处理: <div onclick = zdh()></div> 2) dom0 dom元素.onclick = function zdh(){}; 3) dom2 : 3个参数 dom元素.addEventListener(事件类型 , 回调函数, true ); dom元素.ad
阅读全文
js 测试
摘要:今天js测试题目: 被基础题目虐暴。。。。。。惨不忍睹 1. var num = 2; switch(num){ case 1: console.log("1"); case 2: console.log("2"); default: console.log("default"); }输出结果为()
阅读全文
https/相对路径,绝对路径
摘要:1. htttps HTTPS(全称:Hyper Text Transfer Protocol over Secure Socket Layer),是以安全为目标的HTTP通道,简单讲是HTTP的安全版 HTTPS和HTTP的区别主要为以下四点:(来自百度百科) 一、https协议需要到ca申请证书
阅读全文