*************** Summary ***************

1.Javascript It's an object-based, dynamically typed scripting language that is prototyped and inherited , It distinguishes between uppercase and lowercase . Mainly implemented in client, Even if the user responds to the user's operation and analyzes and transmits the data .

2.Javascript and Java It doesn't have much to do with . It's just the name repeating four letters .

3.Javascript The main function of is data validation 、 Provide web effects , Dynamic response to user actions , We mentioned Javascript It's also mentioned that jQuery and Ajax.

************Javascript The history of ***********

1. Its predecessor is LiveScript, It was first put into use in 1995 Year of Netscape In the browser of .

2. Then Microsoft got involved in the browser market . Leading to the market's front-end scripting language appeared a tripartite situation . It also makes the front-end script development very confusing . therefore . It's time to set a standard .

3.1997 year ,Javascript1.1 Be submitted to ECMA, Later, the proposal was adopted by the international organization for standardization and the International Electrotechnical Commission , therefore . It became the standard , It's just that it's called ECMAScript.

4. A complete Javascript There are, for example, three parts : Kernel part (ECMAScript)、 Document object model (DOM)、 Browser object model (BOM).

************* first Javascript Program ***********

1. I know a lot of people learn programming from helloworld Starting , Then we also start from this classic helloworld Start putting .

2. There's a new html file , Open it with an editor , Write, for example, the following code :

function xin()
alert("Hello world");
<button type="button" onclick="xin()"> Xin Xing </button>

3. After saving, open it with a browser , And then click “ Xin Xing ”button, There will be a pop-up dialog box , There are ten big characters on it "Hello world".

4. As you can see from the example above , What we use here is to put Javascript The code is embedded in html In the papers . Of course , It can also be written separately , Then from html File to import the Javascript file .

5. Some old browsers may need to script add type ="text/javascript", But now it's no longer necessary , Modern browsers and HTML5 It's all default Javascript Of .

6. Above we defined a Javascript Function of , It USES function To define . Other parts are very similar to other programming languages , Grammatically, it's very close to Java.

7. We are body There is one in the label Buttonbutton, Its function is to trigger certain events when clicking , That is to call a certain function , The function here is ours script The function in xin.

**************Javascript Where is the writing *******

1. We've written on it head In the label . In fact, it can be written in body In the label .

2. Look, for example, at the following code :

document.write("<p> Blog Garden Xinxing </p>");
document.write("<p> Pass on the warmth </p>");

3. It's like we import css file , We can import it in a similar way Javascript file . Let's build a new one HTML file , The code is as follows :

<script src = "my.js"></script>
<button onclick = "xin()"> Xin Xing </button>

Then we create a new one in the same folder my.js file , The content is as follows :

function xin(){
alert(" Xin Xing ");

Then we save the html file . perform . Found that we click “ Xin Xing ”button When , One will pop up “ Xin Xing ” The dialog .

4. It's important to remember that , We introduced js It's written directly in the file js The code can , There's no need to use any additional tags .

************ Summary *************

1. In this section we interpret Javascript Basic knowledge of .

2. then , We started for the first time js plan , then , We explained js Write the location code .

2014 In Xinxing Javascript More related articles in the interpretation section

  1. 2014 Nian Xinxing Javascript Read the second section

    In this section, let's explain Javascript The grammar of , Even though js The language is very good easy, Its grammar is also relatively easy to learn , But if you don't study, you won't , therefore , Let's get to the bottom of it . ******** gaze ************* 1. We ...

  2. 2014 Nian Xinxing Javascript Reading the fourth section Flow control statement

    In the last section, we introduced functions , In this section, we introduce the process control statement , For any programming language , Process control is very important , That's what we often call sequential structure . Select structure and cycle structure . ************ Selection structure ******* ...

  3. 2014 Nian Xinxing Javascript Reading the third section

    After the first section of the introduction and the second section of the operator . So next we can learn Javascript Function of , Yes, of course . No matter what programming language you learned before . There will be the concept of function , Suppose you're learning Pascal, There will be " The process & ...

  4. 2014 Xinxing of the year css Tutorial Summer Edition section 6

    In this section we are going to talk about layout , In fact, the layout itself is very simple , But it's not so easy to make a reasonable arrangement , Just like we write articles , Writing an article is very simple , But it's hard to write a masterpiece , This requires our solid foundation and understanding of literature , however , A journey , ...

  5. 2014 Xinxing of the year css Tutorial Summer Edition section 5

    In this section we'll talk about css Medium ” The box model “, namely ”box model“, It's usually used in layout , This ” The box model “ Some people become ” Frame model “, In fact, the principle is the same , Its general principle is like this , It puts a HTML The elements are divided into these parts ...

  6. 2014 Xinxing of the year css Tutorial Summer Edition section 4

    In the next section, I plan to talk about the styles of hyperlinks and lists , Then we make a navigation bar , In fact, the navigation bar is very common , But what we have done here is not so perfect , When we're done css And then perfect it . ************** ...

  7. 2014 Xinxing of the year css Tutorial Summer Edition section 3

    In the second section, we're almost all about CSS Selector , So in the next section, let's talk about CSS The color of the text and some things , Although I'm not sensitive to color matching , But I'm more interested in color . *********CSS The color in ********* ...

  8. 2014 Xinxing of the year css Tutorial Summer Edition section 2

    In the first section, we introduce CSS workflow , I believe readers will have a general understanding of , So next we're going to have a deeper look CSS The details of , These problems will make our work more perfect . ************* notes ***** ...

  9. 2014 Xinxing of the year css The first section of the Summer Edition of the tutorial

    CSS yes Cascading Style Sheets Abbreviation , Cascading style sheets , It's used to show HTML The style of , namely HTML Just write about what the page contains , As for how to express them , from CSS To customize . ************* ...

Random recommendation

  1. React-Native Component development method

    Preface React Native The development idea is to organize the whole system by combining various components App, In most cases, by combining View.Image And other basic components , It is very convenient to implement various complex cross platform components , However, in the need of native function support . ...

  2. SPSS Data analysis — Chi square test

    t Tests and ANOVA mainly focus on continuous variables , Rank sum test is mainly aimed at ordered categorical variables , Chi square test is mainly used for unordered categorical variables ( It can also be used for continuous variables , But it needs to be discretized ), It's also very versatile , Many statistical methods are derived from Chi square statistics . card ...

  3. SQL Server 2012:SQL Server Architecture —— The life cycle of a query ( The first 2 part )

    Plan caching (Plan Cache) If SQL Server When you've found a good way to execute a piece of code , It should be reused as a subsequent request , Because generating execution plans is time-consuming and resource intensive , It makes sense to do so . If you don't find a reprieve ...

  4. Use... Correctly STL-MAP in Erase function

    It's all in the code . #include <iostream> #include <map> #include <string> using namespace std ...

  5. jsoneditor Show Json data

    Git Open source address :https://github.com/josdejong/jsoneditor/blob/master/docs/api.md 1. quote JS file <!-- jsoneditor ...

  6. Oracle VM VirtualBox( One ) Quickly copy a new virtual machine

    Quickly copy a new virtual machine One Find the virtual machine vdi file , Make a copy and rename . Two Modify the UUID notes : You can't create a virtual machine without modifying it , Will throw out Oracle VM VirtualBox UUID already e ...

  7. 20145215《 Cyber warfare 》Exp4 Malware Analysis

    20145215< Cyber warfare >Exp4 Malware Analysis Answer the basic question If you suspect that there is malicious code on a host at work , But it's just a guess , I want to monitor what the system is doing day by day . Please design the operations you want to monitor , use ...

  8. start-up Azure Simulator error resolution

    Error pop up : Output console : Microsoft Azure Tools: Warning: Overriding public port 80 to 2888 in role 'WebRole1'. M ...

  9. SpringCloud Service registration and discovery Eureka( One )

    Eureka yes Spring Cloud Netflix Part of the microservices suite , It can be done with Springboot Built microservices are easy to integrate .Eureka Contains both server-side and client-side components . Server side , It's also called service registration ...

  10. ASP.NET MVC:WebViewPage.cs

    ylbtech-funcation-Utility: ASP.NET MVC:WebViewPage.cs Represents the use of ASP.NET Razor Properties and methods required for the view of Syntax . 1.A,WebVie ...