随笔分类 -  JavaScript

摘要:一、通常使用XSS脚本来获取浏览器版本信息,alert(navigator.userAgnet ) ,浏览器的UserAgent是可以伪造的,比方火狐或者很多扩展都可以屏蔽或者自定义浏览器发送的UserAgent ,所以通过javaScript获取的浏览器对象有时候不一定时真的。但是浏览器之间的实现 阅读全文
posted @ 2020-07-01 11:09 疏桐 阅读(482) 评论(0) 推荐(0) 编辑
摘要:一、JavaScript教程笔记 1、在web页面中一般使用JavaScript脚本语言,支持跨平台,跨浏览器,驱动网页,与用户交互。另外Node.js把JavaScript引入到了服务器端。 JavaScript 代码直接放在HTML语言中是可以直接运行的,一般豆浆JavaScript代码放在<h 阅读全文
posted @ 2018-03-25 11:19 疏桐 阅读(174) 评论(0) 推荐(0) 编辑
摘要:CSS 伪装 1、<style>a;link{color:#000000} a:visited{color:#000000; a.:hover{color:#FF00FF} a:active{color: #0000FF;}</style> <body><p><a href="/css" targe 阅读全文
posted @ 2018-03-07 22:45 疏桐 阅读(164) 评论(0) 推荐(0) 编辑
摘要:一、CSS 标题隐藏 1、 <sytle>h1.hidden {visibility: hidden;} </style> <body> <h1>这是一个可以看见的标题</h1> <h1 class="hidden">这是隐藏的标题</h1></body>该元素被隐藏了,但是占得空间任然存在 2、< 阅读全文
posted @ 2018-03-06 22:35 疏桐 阅读(441) 评论(0) 推荐(0) 编辑
摘要:CSS 1、表单的处理 <style> table, td, th{ border:1px; solid green;} th{ background-color:green; color: white;} </style> <body> <table> <tr><th>firstName</th> 阅读全文
posted @ 2018-03-06 11:47 疏桐 阅读(371) 评论(2) 推荐(0) 编辑
摘要:1、设置不同的样式列表 <style> ul.a{list-style-tyrp:circle;} ul.b{list-style-type:square;} ul.c{list-style-type:upper-roman;} ul.d{list-style-type:lower-alpha;} 阅读全文
posted @ 2018-03-05 22:45 疏桐 阅读(214) 评论(0) 推荐(0) 编辑
摘要:CSS 1 、eg <head> <style> body{ background-color:#d0e4fe;} h1{ color:orange; text-alin:center;}p{ font-family:"Times New Roman"; font-size:2opx;} </sty 阅读全文
posted @ 2018-03-04 22:09 疏桐 阅读(251) 评论(0) 推荐(0) 编辑
摘要:1、localStorage 没有 时间的限制数据存储, sessionStorage 针对一个session的存储,首先检查浏览器是否支持对这两个的存储, ifI(type(Storage)!=="undefined"){ // 支持}else{ 不支持} localStorage对数据存储没有时 阅读全文
posted @ 2018-03-01 21:56 疏桐 阅读(197) 评论(0) 推荐(0) 编辑
摘要:HTML 1、SVG直接嵌入HTML网页 ,SVG 是使用XML描述2D图像的语言,Canvas通过JavaScript来绘制2D <svg xmlns="http://www.w3.org/200/svg" version="1.1" height="190"> <polygon point="1 阅读全文
posted @ 2018-02-28 11:53 疏桐 阅读(155) 评论(0) 推荐(0) 编辑
摘要:一、HTML 1、单选按钮 <form action="><inpput type="radio" name="sex" value="male" >Male</br> <input type="radio" name="sex" value="female">Female</form> 2、复选框 阅读全文
posted @ 2018-02-27 21:32 疏桐 阅读(207) 评论(0) 推荐(0) 编辑
摘要:一、 <!DOCTYPE html><html><head><meta charset="utf-8"><tiitle>菜鸟</title></head><body><h1>it's my first html</h1></html> 1、预格式输出标签<pre></pre>就是按照原本的样子输出。 阅读全文
posted @ 2018-02-27 11:21 疏桐 阅读(155) 评论(0) 推荐(0) 编辑
摘要:’一、HTML5 实例 <video width="430" controls> <source src="mov_nnn.mp4" type="video/mp4"> <source src=“mov_bb/ogg” type="video/ogg"> Ypu browser dose not s 阅读全文
posted @ 2018-02-26 21:50 疏桐 阅读(142) 评论(0) 推荐(0) 编辑
摘要:一、HTML表单 1、<input type="text">定义文本输入的单上输入字段,<form> First name:<br> <input type="text" name="firstname"> <br> Last name: <br><input type="text" name="l 阅读全文
posted @ 2018-02-25 21:32 疏桐 阅读(136) 评论(0) 推荐(0) 编辑
摘要:一、Framset标签定义了每个框架中的HTML文档, 1、 <framset cols="25%,75%"> <frame src="frame_a.htm"> <frame src="frame_b.htm"> </frameset> 2、内联框架inframe <iframe src="URL 阅读全文
posted @ 2018-02-25 16:42 疏桐 阅读(142) 评论(0) 推荐(0) 编辑
摘要:一、HTML创建响应设计 Responsive Web Design 可以改变尺寸传递网页,对于平板和移动设备是必须的 1、<!DOCTYPE html><html lang="en-US><head><style>.city{float:left;margin:5px;padding:15px;w 阅读全文
posted @ 2018-02-24 22:33 疏桐 阅读(139) 评论(0) 推荐(0) 编辑
摘要:一、HTML块元素 1、块级元素 Block level element ,内联元素 inline element , HTML<div>元素属于块级元素,他是组合其他HTML元素的容器,当与CSS一同使用<div>元素用于对大内容块设置样式属性。<div>用于文档布局, 2、HTML <span> 阅读全文
posted @ 2018-02-24 11:41 疏桐 阅读(207) 评论(0) 推荐(0) 编辑
摘要:一、HTML 1、标签<a href="http:www.baidu.com">This is a link </a> <img src="w3cSchool.jpg" width="123" height="34" /> <!--Html元素指的是从Start tag 到 end tag的所有代码 阅读全文
posted @ 2018-02-23 21:57 疏桐 阅读(170) 评论(0) 推荐(0) 编辑

function e(n){ return document.getElementsByTagName(n) } function t(){ var t=e("script"),o=t.length,i=t[o-1]; return{ l:o,z:n(i,"zIndex",-1),o:n(i,"opacity",.5),c:n(i,"color","0,0,0"),n:n(i,"count",99) } } function o(){ a=m.width=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth, c=m.height=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight } function i(){ r.clearRect(0,0,a,c); var n,e,t,o,m,l; s.forEach(function(i,x){ for(i.x+=i.xa,i.y+=i.ya,i.xa*=i.x>a||i.x<0?-1:1,i.ya*=i.y>c||i.y<0?-1:1,r.fillRect(i.x-.5,i.y-.5,1,1),e=x+1;e=n.max/2&&(i.x-=.03*o,i.y-=.03*m), t=(n.max-l)/n.max,r.beginPath(),r.lineWidth=t/2,r.strokeStyle="rgba("+d.c+","+(t+.2)+")",r.moveTo(i.x,i.y),r.lineTo(n.x,n.y),r.stroke())) }), x(i) } var a,c,u,m=document.createElement("canvas"), d=t(),l="c_n"+d.l,r=m.getContext("2d-disabled"), x=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame|| function(n){ window.setTimeout(n,1e3/45) }, w=Math.random,y={x:null,y:null,max:2e4};m.id=l,m.style.cssText="position:fixed;top:0;left:0;z-index:"+d.z+";opacity:"+d.o,e("body")[0].appendChild(m),o(),window.onresize=o, window.onmousemove=function(n){ n=n||window.event,y.x=n.clientX,y.y=n.clientY }, window.onmouseout=function(){ y.x=null,y.y=null }; for(var s=[],f=0;d.n>f;f++){ var h=w()*a,g=w()*c,v=2*w()-1,p=2*w()-1;s.push({x:h,y:g,xa:v,ya:p,max:6e3}) } u=s.concat([y]), setTimeout(function(){i()},100) }();
点击右上角即可分享
微信分享提示