DAY03-JS 168 Java EE Employment class

Source: Internet
Author: User
Tags null null parse string tag name

* Curriculum review:
* CSS
* Introduction to CSS
* Cascading Style sheets.

* CSS and HTML combination (4 kinds)
* HTML Tag provides property style= "CSS Code"
* HTML provides tags <style type= "text/css" &GT;CSS code </style> placed in * Introduction of external documents
@import URL ("Address of the CSS file"); write in the middle of the <style> tag
* Via HTML tags <link rel= "stylesheet" type= "Text/css" href= "CSS Address" >

* Priority: From top to bottom in general, from outside to inside, priority from low to high.
Special Case Tag Selector < class selector < ID selector < Style property

* CSS Selector
* Basic Selector
* Tag name Selector
* Div{css}
* Class Selector
* There is a tag that provides the class attribute <div class= "value" ></div>
*. value {CSS}
* ID Selector
* There is a tag that provides the class attribute <div id= "value" ></div>
* #值 {CSS}

* Extended Selector
* Correlation Selector
* Middle Use space example: div font{css}
* Combo Selector
* Different selectors have the same style example:. Haha, #hehe {CSS}
* Pseudo Element Selector
* CSS provides a number of selectors.

* Layout of CSS


* JS
* Introduction to JS
* JS Object-based and event-driven scripting language, acting on the client.
Characteristics
* Interactivity
* Security
* Platform-based expansion

* JS is different from Java
* JS Object-based, Java object-oriented
* JS parsing can be executed, Java first compiled and then executed
* JS is a weak type of language, Java is a strongly typed language.

* The composition of JS
* ECMAScript
* BOM
* DOM

* JS Syntax
* keyword var function
* Identifiers
* Note///**/
* Variable
* VAR declaration variable
* JS Basic data
string literal type
* var str = "ABC"; var str = ' abc ';
Number numeric type
* No distinction between integers and decimals
Boolean Boolean type
NULL NULL
Undefined undefined (declaration not assigned)

* typeof () determine the type of the variable

* JS operator
Alert (true + 1);//2

= = Comparison Value
= = = Comparison Value and type

* JS's statement
if (num = = 4) {
Alert ("SS");
}

for (Var i=0;i<4;i++) {
document.write ("str" + "<br/>");
}

* JS Array
* Declaring an array of two ways
var arr = [22,33];
var arr = new Array (4); length
var arr = new Array (4,5); element

* Length of array

* JS's function
* Declaring function functions
Function name (argument list cannot use the var keyword) {
function body;
Return value no can not write
}

function Getsum () {
return 100;
}

var sum = getsum;
SUM ();

=============================================================================================================== ========

* JS dynamic function and anonymous function
* JS dynamic function and anonymous function
* Dynamic function
function Getsum () {
return 50;
}
JS provides built-in object function

* Anonymous function
* Functions with No Name


* JS global variables and local variables
* Global variables: Variables defined inside the <script> tag, global variables.
* Local variables: variables defined inside the function, local variables.


* JavaScript objects and APIs
* String Object
* Disclaimer
var str = "ABC";
var str = new String ("abc");

* Attributes: Length: string lengths
Method
* HTML-related methods (writing without prompting)
* Bold () displays the display string with bold
* FontColor (color) parameter is required, set the color of the font
* FontSize (size) to set the font size (1-7)
* Italics () italic
* Link (URL) settings
* SUB () subscript
* SUP () superscript

* Similar to String objects in Java (* * * *)
* CHARAT (index) returns the character at the specified position
* INDEXOF (Str,fromindex) Retrieve string, no return-1
* LASTINDEXOF (Str,fromindex) retrieve string from backward forward
* Replace (the string to replace, the replacement of what)

* SUBSTRING (start,stop) intercept string
* SUBSTR (Start,length) intercepts the string, starting from where to intercept how long


* Define a method: You can remove the spaces on both sides of the string.
var str = "AB C";
var newstr = Mytrim (str);
NEWSTR = "Ab C";


* String Object
* Disclaimer
var str = "ABC";
var str = new String ("abc");

* Attributes: Length: string lengths
Method
* HTML-related methods (writing without prompting)
* Bold () displays the display string with bold
* FontColor (color) parameter is required, set the color of the font
* FontSize (size) to set the font size (1-7)
* Italics () italic
* Link (URL) settings
* SUB () subscript
* SUP () superscript

* Similar to string objects in Java
* CHARAT (index) returns the character at the specified position
* INDEXOF (Str,fromindex) Retrieve string, no return-1
* LASTINDEXOF (Str,fromindex) retrieve string from backward forward
* Replace (the string to replace, the replacement of what)

* SUBSTRING (start,stop) intercept string
* SUBSTR (Start,length) intercepts the string, starting from where to intercept how long


* Array Object
* Declaring arrays
var arr = [12,33];
var arr = new Array (+);

* Array Object
* Declaring arrays
var arr = [12,33];
var arr = new Array (+);

* Properties: Length: Lengths
Method
* CONCAT (elements, arrays); Returns a new array
* Join (s) by S ID (-), delimited, return string
* POP () Delete the end element and return the last element
* PUSH () Adds an element to the end, returning the length of the new array
* Sort () method of sorting


* Date Dates Object
var date = new Date (); current date
* Date Dates Object
var date = new Date (); current date

* toLocaleString () convert local date format
* toLocaleDateString () contains only dates
* toLocaleTimeString () contains only time

* GetDate () returns one day in one months (1-31)
* GetDay () returns one day of the week (0-6)
* GetMonth () return month (0-11) +1
* getFullYear () return year

* GetTime () returns the number of milliseconds
* SetTime () Gets the date by the number of milliseconds
* var date3 = new Date (1415937050973);

* Parse (str) Parse string, returns the number of milliseconds
Date.parse (str);

Str:
2014-11-14 can't be resolved.

11/14/2014 can be resolved
2014,11,14 can parse


* Math and mathematics-related objects
* Math Object (static method)
* Rounding on Ceil (x)
* Floor (x) rounding down
* ROUND (x) rounding
* Random number (0-1)


* RegExp Object
* Regular Expression Object
* Application: Write the registered form and verify the contents of the form input.

* var reg = new RegExp ("expression"); (not used frequently in development)
* var reg =/Expression/frequently used in development
* var reg =/^ expression $/often used in development

* EXEC (String) is not used frequently
* If matched, returns the result of the match

* Test (String) frequently used
* If match, return is true, if not match, return is false

if (Reg.test ("abc")) {
Match up.

}else{

}


* Global Functions
* Using global functions, no objects are required.
* Global functions can be used.
* Global helps to manage the overall function.

* Global Functions
* Eval () can parse the string, execute the middle of the string JS code
* IsNaN () determines whether a non-numeric value
* parseint () parse string, return integer

* encodeURI () to encode
* decodeURI () parsing and decoding

* encodeURIComponent ()
* decodeURIComponent ()

* Escape ()
* Unescape ()


* BOM Browser object model
* (Brower Object Model)

Window Object (* * * *)
Navigator and browser version related objects (* *)
Screens and screen-related objects (-*)
History is associated with browser histories (* *)
Location and browser address-related objects (* *)



Document Object



Window Object (* * * *)

Navigator and browser version related objects (* *)
* UserAgent Get the information about the browser
* Window.navigator.userAgentwindow can be omitted without writing

Screens and screen-related objects (-*)

History is associated with browser histories (* *)
* Back () return to previous page
* Forward () go to the next page

* Go ()
* Pass parameter Go (1) equals forward ()
Go (-1) equals back ()

Location and browser address-related objects (* *)
* href gets and sets the path of the browser (* * *)

* Event
* OnClick Click event
* The notation of the value:

* Document Object
* Alert () Popup Notification box
* Confirm ("parameters") inquiry box
* Provide two buttons to confirm and cancel
* If Click is OK, return true, if click Cancel, return False

* Moveby () mobile browser

* SetInterval ("function", millisecond value) timing-dependent
* Perform function once per millisecond value
* Returns a unique ID value

* SetTimeout ("function", millisecond value)
* Perform a function once after the millisecond value
* Returns a unique ID value

* Clear Timer
Clearinterval (value of ID)
Cleartimeout ()

* Close () Closes the browser window
* Open () Opens the browser window

Properties
* Opener returns a reference to the window that created this window.
* Win open () pop-up Baidu window

In the Baidu window Baidu.opener got a reference to win.

* Document Object method
* document.getElementById ("nameId"); Gets the object that is the input tag

* DOM Document Object model

DAY03-JS 168 Java EE Employment class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.