2019-9-24: penetration testing, css styles, js based learning notes

css and nested groups:
group: For example, there <h1> <h4> <p >, 3 tabs, can be provided when css h1, h4, p {style: this attribute syntax}
nested: .lei {style such as: properties} ,. lei p {style: attribute}, = "lei" p elements within element specifies a style for all class
p.lei style {:} properties, as long as the P-tag, and class = "lei" will be change style

css display:
div {visibility: hidden}, this way there is still the original features, such as the label wrap will wrap
div {display: none:}, this approach will hide labels and feature ---- It can be used to write phishing sites

css Location:
position: static, relative, Fixed, Absolute, Sticky
static: static position is the default position, not by other alignment, such as top bottom left right These attributes affect the
relative: the relative positioning of the positioning element, is relative to its normal default position to position their own set of
fixed: the label affixed to the browser window position is not being moved affect the window size
absolute: absolute positioning position relative to the nearest parent element has been positioned, if no parent, it is relative to the label
sticky attributes the following characteristics:
this element does not flow out of the document, still retains elements of the original location in the document stream.
When the rolling element is the offset value exceeds the specified container element is fixed at a predetermined position within the container. I.e., if you set the top: 50px, then the distance elements positioned opposite a fixed top position 50px no longer sticky element moves upward reach.
Element is fixed relative offset relative to the nearest ancestor element having a scroll box, if not ancestor element can roll, then the offset is relative to the element to calculate the viewport

css align:
text-align = left: Center, this text is center
margin: auto, picture elements centered

JavaScript, is responsible for interacting with the user or server, determine the behavior of pages
js is a front end into the language, is a scripting language

js need to write in the html tag <script> </ script> tag, the script can be placed in <head> or <body> in
alert ( 'xx'); pop-up window to
document.write ( 'xxx'); xxx can be a label, write the contents of the page

js output
window.alert () bomb box
document.writ () will be written in HTML content
innerHTML to write HTML code for the content in
console.log () writes the contents to the browser console
document.write (data ( )); write the current time

It should be noted, js the case-sensitive
single-line comments //
Multiline comments / * * /

js Data Type
Value Type
number: number, decimal, integer, scientific notation
string: String, using single and double quotation marks
booean: Boolean
null: Empty
undefined: Undefined

When you define data variables, it is recommended to use the var keyword

Reference type
array: the array , [1,2,3,4] or array define an array, the array definition sentence, var array_te = new Array () ; Array_te [0] = "heelo"; Array_te [1] = "sym"; or var xx = new Array ( "xx ", "xx"); or var XX = [ "XX", "XX"];
Object: Object , {name: 'sym', age: 20}, braces object definition statement, var person = {attribute: value, attribute: value};
object property use, var variable name = object name attribute; // dot mode or a variable name = var [object name "object property"];. // index mode
. a method for calling a function, variable names, function name = object name ();
function: function
js function definition, function function name (parameter) {} function body, wherein after line of code written must be added; semicolon
such function add (a, b) { var c; c = a + b; return c;};
function into
non-parametric function, function fun () {} function body
with a reference function, function fun (a, b ) {function body, the process reflects the team a, b} two parameters
have a return value of the function, function fun () {return results to return}
no return value of the function, function fun () {return} no

When you define a variable, you need to pay attention to:
1, the variable must begin with a letter, or use $ _ underscore can be, but is not recommended for
2, case sensitive
3, recommended var keyword to define variables, the variables need to define the use of when the definition can be assigned. Assignment symbol =
4, a plurality of variables such statements can be defined. 1 = A, B = 2, C =. 3;
. 5, uninitialized variables, equivalent to undefined, no definition of
variables into
local variables, variables defined within the function can only be used inside the function
variables global variables are defined outside the function, all pages on the script and function can be used

Processing strings
strings need to use "" '' quotes, the array subscripts embodiment may be used to access the string of characters not a
string of characters if necessary special required for printing escape character \ symbols, an escape Fu, the escape character is meant to maintain the original meaning and not be treated as special characters using the
string name .length, get the length of the string, the string length is not escape
special characters: ', ", \, \ r Enter, \ t tab, \ b backspace , \ f feed
string can be used as the object

Common attributes string
length returns the string length
prototype was added to allow object properties and methods

The method of the string, the method can be understood as a function of
the charAt (), returns the specified character position
the indexOf (), returns the index of the specified character
Split (), dividing the string array
substr (), extract the string
the substring (), extracted the character string intermediary between two specified index
tostring (), to convert the object string
toLowerCase (), small letter string
toUPerCase (), uppercase characters turn

Objects
using an abstract concept to describe an object, person {properties: methods, attributes: Function};

Ngrok network resource mapping within the public network,. / Sunny clientid

robots.txt protocol to prevent network search engines climb to take sensitive site pages, to place a robots.txt file in the root directory of the site, which is not allowed to write clearly which pages reptile crawling
login window breakthrough way, weak passwords, universal password , override logic, blasting

Guess you like

Origin www.cnblogs.com/sym945/p/11580776.html