27
2023
08

前端训练营——JavaScript课件:五:Web攻击

5.1:XSS攻击

推荐阅读:

26
2023
08

前端训练营——JavaScript课件:四:Node

4.1:基本介绍

Node.js 是一种开源与跨平台的 JavaScript 的运行环境,能够使得javascript脱离浏览器运行。 它是一个可用于几乎任何项目的流行工具,允许我们通过JavaScript和一系列模块来编写服务器端应用和网络相关的应用。

26
2023
08

前端训练营——JavaScript课件:三:JS脚本

三:JS脚本

    // ==UserScript==
    // @name         页面自动滚动
    // @description  通过使用快捷键实现页面自动滚动
    // @match        *://*/*
    // @grant        none
    // ==/UserScript==

    (function() {        'use strict';           
     let speed = 0;           
     let speed_num = 1.5;  // 修改这个调整滚动速度
            
            let getScrollTop = () => {                var scrollTop = 0,
                    bodyScrollTop = 0,
                    documentScrollTop = 0;                if (document.body) {
                    bodyScrollTop = document.body.scrollTop;
                }                if (document.documentElement) {
                    documentScrollTop = document.documentElement.scrollTop;
                }
                scrollTop = (bodyScrollTop - documentScrollTop > 0) ?
                 bodyScrollTop : documentScrollTop;             
                   return scrollTop;
            }    
            let getWindowHeight = () => {                var windowHeight = 0;               
             if (document.compatMode == 'CSS1Compat') {
                    windowHeight = document.documentElement.clientHeight;
                } else {
                    windowHeight = document.body.clientHeight;
                }                return windowHeight;
            }           
            let getScrollHeight = () => {                var scrollHeight = 0,
                    bodyScrollHeight = 0,
                    documentScrollHeight = 0;                if (document.body) {
                    bodyScrollHeight = document.body.scrollHeight;
                }                if (document.documentElement) {
                    documentScrollHeight = document.documentElement.scrollHeight;
                }
                scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ?
                 bodyScrollHeight : documentScrollHeight;      
                          return scrollHeight;
            }           
            setInterval(() => {               
             let bottomFlag = (getScrollTop() + getWindowHeight() == getScrollHeight()) ? true : false;  
                          let topFlag = (getScrollTop() == 0) ? true : false;            
                              if (bottomFlag || topFlag) {
                    speed = 0;
                } else {                    document.documentElement.scrollTop += speed;
                }
            }, 5)     
            document.onkeydown = (e) => {
                e = event || window.event;                // 同时按上键与alt键向上滚动
                if (e && e.keyCode == 38 && e.altKey) { 
                    let bottomFlag = (getScrollTop() + getWindowHeight() == getScrollHeight()) ? true : false;             
                           if (bottomFlag) {                        document.documentElement.scrollTop += -1;
                    }
                    speed -= speed_num;
                }                // 同时按下键与alt键向下滚动
                if (e && e.keyCode == 40 && e.altKey) { 
                    let topFlag = (getScrollTop() == 0) ? true : false;                 
                       if (topFlag) {                        document.documentElement.scrollTop += 1;
                    }
                    speed += speed_num;
                }                // 同时按 CTRL + ALT 键停止滚动
                if (e && e.altKey && e.ctrlKey) {
                    speed = 0;
                }
            }            // 单击页面停止滚动
            document.onclick = () => {
                speed = 0;
            }            // 滑动滚轮页面停止滚动
            document.onmousewheel = () => {
                speed = 0;
            }            document.addEventListener("DOMMouseScroll", () => {
                speed = 0;
            })
    })();


26
2023
08

前端训练营——JavaScript课件:二:ajax

2.1:基本概念

Ajax(Asynchronous Javascript And XML),即是异步的JavaScript和XML,Ajax其实就是浏览器与服务器之间的一种异步通信方式。它可以异步地向服务器发送请求,在等待响应的过程中,不会阻塞当前页面,在这种情况下,浏览器可以做自己的事情。直到成功获取响应后,浏览器才开始处理响应数据。

26
2023
08

前端训练营——JavaScript课件:一:JavaScript基本介绍

一:JavaScript基本介绍

JavaScript是一种广泛使用的脚本语言,它允许开发人员为Web应用程序添加交互性和动态性。JavaScript最初是由Netscape Communications在1995年开发的,它已经成为了Web开发的标准之一。

26
2023
08

前端训练营——JavaScript课件:前言

以下是一些推荐:

25
2023
08

PHP加密算法

零:密码外泄门

2011年12月,CSDN的安全系统遭到黑客攻击,600万用户的登录名、密码及邮箱遭到泄漏。随后,CSDN"密码外泄门"持续发酵,天涯、世纪佳缘等网站相继被曝用户数据遭泄密。泄密就算了,更让人无语的是密码等信息都是明文存储,导致黑客直接拿到了信息而无需破解,这一系列事件发生后,密文存储用户信息的方式开始流行。

25
2023
08

致命错误:curl/curl.h:没有那个文件或目录

需要安装curl-devel,即:
yum -y install curl-devel

然后再:

23
2023
08

asp生成mdb

Function f_backup_addnew(ym)

vDb=Server.MapPath("../#log#/#log#_"&ym&".mdb")

Set fso = Server.CreateObject("Scripting.FileSystemObject")

22
2023
08

asp是否存在字符

if Instr(ab, "a")>0 then或

if InstrRev(ab, "a")>0 then


Split(str,"a")(0)