Job Description: The following activities are broadly marked by the need to use the knowledge point, where the gray text part of the difficulty of the extension to improve the problem, for the choice.
- (Basic) write down the basic features of JS language
- (Basic) write down the basic points of JS Grammar (statement line, case, comment, run environment and mode, etc.)
- (base, output) when the Web page opens, asking for the number 1-6 to pop up, and each pop-up, the page displays a corresponding header row (that is, from H1-h6). Note that the H1-h6 label should not appear on the page, but it should be written by JS.
- (data type) define a number of JS variables, you need to show the various data types in JS, and output the value of each variable and its corresponding type in the page. --use "typeof variable name" to get the type of the variable
- (variable) write down the basic rules of JS naming.
- (Assignment value/reference pass value) read the program, write the result:
(1), (2)
- (expression) known as any two positive integers (a, b), as the right triangle of the right-angled edge length, to seek the hypotenuse length.
Attached: The power operation syntax: s = Math.pow (x, y)--x the Y-side, the result is S.
- (expression, operator) known as A,b,c, the value of D in the following cases:
var A, B, C, D;
A = 1; b = 2.2; c = 3.3;???????? D = A + B + C;
A = 1; b = 2.2; c = "3.3";???? D = A + B + C;
A = 1; b = "2.2"; c = 3.3;???? D = A + B + C;
A = "1"; b = 2.2; c = 3.3;???? D = A + B + C;
A = "1"; b = 2.2; c = 3.3;???? D = A + (b + c);
A = "1"; b = 2.2; c = 3.3;???? D = (A + b) + C;
In the calculation expression above D, the plus sign (+) is replaced by a minus sign (-), what is the result? Please check and understand the operator rules in person.
- (operator) Bitwise operation: Calculates the result of 100-shift-right 2-bit, and the result of moving the 3-bit left.
- (operator) Read program write result:
var i = 10; var j = i++; Alert (i + "," + j);
var i = 10; var j = ++i; Alert (i + "," + j);
var i = 10; var j = i++; i=j++; Alert (i + "," + j);
var i = 10; var j = ++i; K=i+j; Alert (i + "," + j);
- (expression, operator) a small ball falls from the air, asking the following questions:
- If the ball is known to drop at a height of 1000m, the speed of the touch of the ground instantly;
- If the velocity (1000m/s) of the ball is known, the height of the drop is calculated.
- Free Fall formula: velocity Law of Free fall:v=gt, displacement law of free falling:H=GT2/2. ; (where g is the gravitational acceleration, g≈9.8m/s2;v on earth is speed, h height, T is time)
- (branch structure) defines a variable that represents a "score" and assigns it a value, in which the following text is printed on the page, depending on the score:
Excellent (>=90), Good (>=80), Medium (>=70), pass (>=60), fail (other case).
--use if and switch two methods to implement.
Attached: The method to take an integer value is: s = parseint (x)--The X is rounded to an integer, such as var x = 12.7; s = parseint (x); The value of s at this time is 12
- (branching structure) depending on how much a person deposits, decide what means of transport to use:
If I have more than 100,000 yuan, I will buy a car to work
Or if I have more than 5000 yuan, I will buy a motorcycle to work,
Or if I have more than 300 yuan, I will buy a bike to work,
Or if I have more than 20 yuan, I will take the bus to work,
Otherwise, I'd have to walk to work.
Tip: Use a variable to represent the number of deposits and determine the variable to output the vehicle used
- (loop) The number of outputs between 1-100 that can be divisible by 3.
- (loop) calculates the number of even numbers between 1-1000 that can be divisible by 3.
- Loop output H1~h6 Label: see the separate file "cyclic output HN label. Doc".
- (cyclic, dual) Output 9x9 multiplication table: See separate document "99 multiplication table". doc.
- (Process: Branch and loop) outputs all leap years from 2000 (inclusive) to 3000 (inclusive).
Attached: A leap year is one that can be divisible by 4 and cannot be divisible by 100, or can be divisible by 400.
- (loop) output an inverted pyramid pattern using an asterisk (the number of rows is determined by the initial variable N):
?
- (cycle, analysis) the thickness of a sheet of paper is 0.01 mm, then the paper is folded 30 times after it is much thicker (said to exceed the height of Mt. Everest). In turn, a piece of paper folded several times, more than 1 meters thick?
- (cyclic, logical analysis) all primes between output 2-200 (primes are the number that can only be divisible by 1 and itself).
- (circular, simple operation) calculates the sum of squares of all numbers from 1 to 100 using 3 loop statements.
- (Loop, simple logic) write a program that outputs 1 to 100 of these numbers. However, when the number is a multiple of 3, the output "three" substitution number, for a multiple of 5 with "five" instead, both a multiples of 3 and 5 multiples of the output "35."
- (Loop, while, logic analysis) Suppose someone has 100,000 cash. A fee is required for each intersection. The payment rule is that when he has cash greater than 50,000 each time it needs to pay 5% if cash is less than or equal to 50,000 per 5,000. Please write a program to calculate how many times this person can pass this intersection.
?
- (cycle, logic analysis) There are three kinds of red, white, black ball several, including red, white ball a total of 25, white, black ball a total of 31, red, black ball a total of 28, beg this three kinds of ball each how many?
- (Loop, logic analysis) Enter a positive integer less than 10 (for example, 5), and output the case:
55555
4444
333
22
1
22
333
4444
55555
- (function, logic) defines a function that determines whether the number of years given is a leap year-the function takes a parameter as the number of years, and the return result is a Boolean value.
- (function) defines a function that computes the "chord" value of any two positive integers (that is, the hypotenuse length of the tick)-the function takes 2 parameters and returns a numeric value.
- (function, partial difficulty) defines a function that calculates the factor of a positive number and (for example, a factor of 6 and a 1+2+3+6=12. A factor is an integer that divides an integer. The factor is also called "approximate". ）
- (function) defines a function that can greatest common divisor a number of two positive numbers. -The approximate number is divisible by one number, greatest common divisor is the largest one that can divide the two numbers simultaneously, such as 6 and 8 greatest common divisor 2, 15 and 20 greatest common divisor 5.
- (character) determines whether a character (such as "a") appears in another character (such as "2340SADFJ2AFFA2"), if it appears , and is asked to appear several times.
- (character, difficulty) replace a character (such as "230weo2323qraf") with a string (such as "3") with another character (such as "888").
- (character, difficulty) write a function that can remove spaces at both ends of a string (e.g. "AB CD", the result should be "AB CD")
- (character, hard) clears all "2" in the string "49238028424".
- (character, partial difficulty) using var S1 = prompt ("Please enter any character", "") can get the user input characters (stored in the variable S1), try programming the user input characters "reverse order" and the letter to uppercase, the other letters to lowercase after alert out.
?
- (array) defines an array and gives 6 integers, representing the group's respective age, and seeking the average age of the group's classmates.
- (array) defines an array and gives 7 integers, which are the maximum and minimum values in the array, and what are the respective subscripts? Further requirements: Swap the position of the maximum and minimum values in the array
- (array) defines an array and gives 8 integers, finding the number of numbers greater than the average in the array, and the number of the numbers less than the average.
- (array) Define an array, enter 9 arbitrary integers, and find an odd-numbered average in the array.
- The smallest odd number in an array of integers, and if there are no odd numbers, the direct output is "no odd", otherwise it is output.
- (Two-dimensional array, logic, partial difficulty) define a two-dimensional array (3 rows and 4 columns), enter any 12 values, the average value of the array, the maximum, the minimum, two subscript are the number of odd numbers, and the "4-week Edge" element and .
- (Two-dimensional array, partial difficulty) defines a two-dimensional array (such as 3 rows and 3 columns) with an equal row and column, and assigns the initial value to the sum of the elements on the two diagonal of the array.
- (Array, logic, hard) reverses the order of the individual elements of an array (without the reverse method of the array).
- (character) use document.write to output the following text on the Web page (note the newline):
Some of the commonly used special characters in JS are:
line break (\ n)
Enter (\ r)
Single quotation mark (')
Double quotation marks (')
Back slash (\)
- (Math) to find 5 of Pi Pi and round rounding.
- (Math, logic) writes a program that requires 6 double-digit integers to be displayed on the page each time the page is refreshed. further requirements: If the requirement for this six number cannot be duplicated.
- (Math, logic) to write a function with a parameter n, on the page output 1~n (n>1) All can be evenly divisible by 3 and 5 even, and requires only 6 per line (that is, more than 6 lines to be wrapped and then output).
- Find out which 3-digit number meets the condition: the number of the digits of the number of the cubic and equal to the number itself (this number is called Narcissus number).
- (date) When you open the page, use Chinese on the page to display the day's date and week (that is, "Days of the Week").
- (Date) How many days are there in the world today? (according to Mr. Luo speculation the world will achieve a permanent peace on September 9, 2099, and Mr. Luo was also the future of the greatest conjecture of the 21st century).
- (Date) Calculate how many days have you lived since you were born?
- How many days do you have to fight when you are 30 years old and you are going to be "successful/famous?"
?
- (DOM, event) has a button, the text on the button is "on", click to turn to "off", then click into "Open", so repeated.
- (DOM, event) light off the effect: Use the following two images to do the material, when the mouse is on the light, leaving the wait to die:
- (DOM, event) "div morph": When the mouse moves up, a red border appears and becomes a yellow background, and the height becomes 100px, and the text changes to red. The original "shape" is restored when the mouse leaves.
- (DOM, event) There is a picture, the mouse point to become larger, and then the point to become larger, so has been getting bigger. Another button, after a click, the image can be immediately restored to the original size.
- Keep doing what the teacher said before two days ago.
- Read more about the classroom code.
- (DOM, event) Click anywhere on the page where a small star (a picture) appears, with a random value of star size between 5px-50px
- (Dom,window object) when you open a webpage, automatically pop up a small page (size of 200x200), a small page with a button, click the button to close the page--when testing the browser to close the "Disable pop-up window" function.
- (DOM, timer) picture automatically switch: see the separate file "picture switch. doc", or when the case.
?
- Read more about the classroom code
- Complete when the homepage is as follows: Pop-up ads window, close floating ads, implement drop-down menu
- (DOM, event) tab-Tabbed browsing: See The individual File tab browse. doc, or when the case.
- (DOM, timer) page The previous Div shows "instant time", that is, the time changes as the system time. --Add: What do you want to show in a text box (input)?
?
- Read more code, read code
- Do when case: Home tab View, login page verification, registration page verification
?
?
Combined _00 Basic Class JS (9days) Job