meta

修改meta标签

自闭症网瘾萝莉.ら 提交于 2020-03-06 17:29:14
只这个好使document.querySelector('meta[name="keywords"]').setAttribute('content',"aa"); document.querySelector('meta[name="description"]').setAttribute('content',"bb"); 来源: https://www.cnblogs.com/qiu2841/p/12427293.html

JSP第一次作业

本秂侑毒 提交于 2020-03-06 17:27:38
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv=

JavaScript break和continue

≯℡__Kan透↙ 提交于 2020-03-06 17:24:10
break 经常用来结束本次循环 实例 < ! DOCTYPE html > < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content = "width=device-width, initial-scale=1.0" > < meta http - equiv = "X-UA-Compatible" content = "ie=edge" > < title > Document < / title > < / head > < body > < button onclick = "myFunction()" > click < / button > < p id = "demo" > < / p > < script > function myFunction ( ) { var text = "" ; for ( var i = 0 ; i < 5 ; i ++ ) { if ( i == 3 ) { break ; } text = text + "The Number is:" + i + "<br>" ; } document . getElementById ( "demo" ) . innerHTML = text ; } < / script

jsp第一次作业

我与影子孤独终老i 提交于 2020-03-06 17:21:57
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv=

jsp第一次作业

南楼画角 提交于 2020-03-06 16:13:57
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <base href="<%=basePath%>"> <title>My JSP 'index.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv=

Web 安全之内容安全策略 (CSP)

对着背影说爱祢 提交于 2020-03-05 17:11:22
内容安全策略 (CSP, Content Security Policy) 是一个附加的安全层,用于帮助检测和缓解某些类型的攻击,包括 跨站脚本攻击 (XSS) 和数据注入等攻击。 这些攻击可用于实现从数据窃取到网站破坏或作为恶意软件分发版本等用途。内容安全策略在现代浏览器中已经包含,使用的是 W3C CSP 1.0 标准中描述的 Content-Security-Policy 头部和指令。 #####那么如何应用? CSP 可以由两种方式指定:HTTP Header 和 HTML。HTTP 是在 HTTP 由增加 Header 来指定,而 HTML 级别则由 Meta 标签指定。 CSP 有两类:Content-Security-Policy 和 Content-Security-Policy-Report-Only。(大小写无关) HTTP header : "Content-Security-Policy:" 策略 "Content-Security-Policy-Report-Only:" 策略 HTTP Content-Security-Policy 头可以指定一个或多个资源是安全的,而Content-Security-Policy-Report-Only则是允许服务器检查(非强制)一个策略。多个头的策略定义由优先采用最先定义的。 HTML Meta : <meta

html常用标签

巧了我就是萌 提交于 2020-03-05 06:21:46
1 html标题    <h1> to <h6> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1>h1</h1> <h2>h2</h2> <h3>h3</h3> <h4>h4</h4> <h5>h5</h5> <h6>h6</h6> </body> </html> h1到h6演示代码 2 html水平线 <hr/> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h6>h6</h6> <hr/> </body> </html> 水平线演示代码 3 html注释<!-- comment --> 注释并不会显示在网页上 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h6>h6</h6><!-- hello world --> <hr/> </body> </html> 注释演示代码 4 html段落<p>以及段落换行<br/> <

jQuery笔记之事件绑定

微笑、不失礼 提交于 2020-03-05 01:26:55
.on(),off(),.one(),.trigger() .hover() jQuery实例方法-动画 .show(),.hide(),.toggle() 参数:null或(duration,easing,callblack) .fadeIn(),.fadeOut(),.fadeToggle(),.fadeTo() 参数:null或(duration,[opacity],easing,callblack) .slideDom(),.slideUp(),.slideToggle() 参数: null或(duration,easing,callblack) .animate() 这是一个大佬等级的动画! 参数:(target duration easing callblack) 配合一下方法使用 .stop(),finish() .delay() jQuery.fx.off = true 动画开关接口 ------------------------------------------------------------- on() 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="viewport" content="width=device-width,

CSS 属性position

◇◆丶佛笑我妖孽 提交于 2020-03-04 18:40:17
基本认识 css position 属性用于指定一个元素在文档中的定位方式(参考谁定位,怎么进行定位) 通过定位我们可以将元素摆放到我们想要摆放的页面位置 使用方法:position:属性值 属性值的可选值: static(默认值) relative absolute fixed sticky 该属性可使用于 所有元素 。且 不可被继承 static static是元素position属性的默认值,即不开启定位. relative(相对定位) 当我们为元素的position属性设置值relative时,那么就会开启元素的相对定位 在这里,我们可以分别设置以下值来移动开启该定位的元素 top 相对于参照物向 下 移动多少距离 bottom g 相对于参照物向 上 移动多少距离 left 相对于参照物向 右 移动多少距离 right 相对于参照物向 左 移动多少距离 在这里,元素移动的参照物是元素在未开启定位的元素原来的位置 当一个元素开启了相对定位后,会具有以下特点 1. 如果我们不为元素设置topright,bottom,left,那么元素的位置是不会发生任何变化的 2. 元素移动时的参考物是元素本身 3. 开启相对定位的元素不会脱离文档流 例子说明(代码形式) <!DOCTYPE html> < html lang = " en " > < head > < meta

meta http-equiv=\"refresh\" 和13种跳转页面方法

試著忘記壹切 提交于 2020-03-03 19:02:39
· meta http-equiv="refresh" 和13种跳转页面方法 我们来说说13种页面跳转方法 先来介绍一下在 服务端JSP脚本 中跳转页面的4种方法: 一、在服务端JSP脚本 中跳转 1. response.sendRedirct(“跳转到页面”); 该方法通过修改HTTP协议的HEADER部分,对浏览器下达重定向指令的,使浏览器显示重定向网页的内容. request无法传值过去. 执行完该页所有代码,然后再跳转到页面. 跳转地址栏改变. 可以跳转到其他服务器上的页面response.sendRedirct(‘//www.jb51.net’). 2. response.setHeader(); 该方法和response.sendRedirect一样,通过修改HTTP协议的HEADER部分 response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); String newLocn=”/index.html”; response.setHeader(“Location”,newLocn); 3. < jsp:forward page=”跳转页面”/> 该方法是利用服务器端先将数据输出到缓冲区的机制,在把缓冲区的内容发送到客户端之前,原来的不发送,改为发送该页面的内容,如果在< jsp:forward