string of 1.js
* String
* string is one of the JS data types
* string concatenation: +, plus has two meanings
* 1, the addition operation in mathematics;
* 2, string connection, when the plus sign on either side is a string, that is the meaning of the string connection;
<! DOCTYPE html>
Process Control in 2.js
* Demand
* when clicked, let box toggle between show and hide
Analysis
* 1, get the button, box
* 2. Add a Click event to the button
* Depending on the display property of box
* If box is displayed, let it hide
* If it's a shadow, let it show
*
* Style It operates inline style, preferably do not use inline style, otherwise it will make HTML particularly bloated
<! DOCTYPE html>* Demand: Click on the Next button, let the image switch to the next picture
* Click on the previous photo to switch the image to the previous picture
Analysis
* 1, get to the Next button
* 2. Add a Click event to the button
* A, using the property operation method to modify the image src;
* B, put the number in a variable, click on the next one, let this variable add 1. The method of string concatenation is used to modify the SRC attribute of the image;
*
* Cumulative
* n=n+1
* n+=1;
* n++;
<! DOCTYPE html>
The following example describes document processing
* Requirements: Click on the button to display the contents of the input box
*
Analysis
* 1, analysis to buttons, text box, box
* 2. Add a Click event to the button
* A, get user input content (text and Vlue)
* B. Display the Acquired content in box
<! DOCTYPE html>JS Strings and Control statements