- <button type="button" onclick="alert(' welcome !')"> Am I !</button>
- You will often see document.getElementById("some id"). The method is HTML DOM As defined in .
- DOM (Document Object Model)（ Document object model ） It's for accessing HTML The formality of elements W3C standard .
This example will change dynamically HTML <image> The source of the （src）：
Turn on the light bulb
In the above example, the code element.src.match("bulbon") It's the function of ： retrieval <img id="myimage" onclick="changeImage()" src="/images/pic_bulboff.gif" width="100" height="180"> Inside src Whether the value of the property contains bulbon This string , If there is a string bulbon, picture src Updated to bulboff.gif, If it doesn't match bulbon character string ,src Then update to bulbon.gif
change HTML Style of element , It belongs to change HTML A variant of attribute .
The above examples are just ordinary verification , If you want to use it in a production environment , Strict judgment is needed , If the space entered , Or continuous spaces isNaN It's impossible to tell . You can add regularity to judge .
Do you know ？
Java（ from Sun The invention ） It's a more complex programming language .
|1997||ECMAScript 1||The first version|
|1998||ECMAScript 2||Version change|
|1999||ECMAScript 3|| Add regular expressions
add to try/catch
|ECMAScript 4||Not released|
|2009||ECMAScript 5|| add to "strict mode", Strict mode
add to JSON Support
|2011||ECMAScript 5.1||Version change|
|2015||ECMAScript 6||Add classes and modules|
|2016||ECMAScript 7|| Add exponential operator (**)
ECMAScript 6 Also known as ECMAScript 2015.
ECMAScript 7 Also known as ECMAScript 2016.
- ECMAScript, from ECMA-262 Definition , Describes the syntax and basic objects of the language .
- Document object model (DOM), Describe methods and interfaces for handling web content .
- Browser object model (BOM), Describe how to interact with the browser .
- Three swordsmen CSS
1.CSS summary CSS Chinese abbreviation cascading style sheet ( English full name :Cascading Style Sheets), Used to control the presentation of the page , Even better looking language . 2.CSS Basic syntax and page reference 2.1 css How to define ...
When doing ceiling effect or fixed effect , Use position:fixed Nothing more than the most convenient , But all evil IE6 It's not fixed The value of this property is , And we want to make IE6 Can be like fixed It's fixed somewhere in the browser , Use onscrol ...
- Three swordsmen HTML
Web The nature of service import socket def handle_request(client): request_data = client.recv(1024) print(request_dat ...
Personal summary : Reading this article requires 20 minute , This article mainly explains the rendering mechanism of the engine in the browser . DOMtree ----| |----> RenderTree CSSOMtree ----| ...
- Indispensable Windows Native (17) - C++: Classes and objects
[ Source download ] Indispensable Windows Native (17) - C++: Classes and objects author :webabcd Introduction is indispensable Windows Native And C++ Classes and objects Example 1. Class design CppE ...
- c The basic operations in
One . Arithmetic operations C There are languages 34 Operator , Including the common addition, subtraction, multiplication and division operations 1. Addition operation + l Apart from being able to do addition , It can also indicate a positive sign :+5.+90 2. Subtraction - l Apart from being able to do subtraction , It can also represent symbols :-10.- ...
- Linux install Nginx
1. nginx Installation : Start learning how to install nginx, First install the necessary software : # yum install libtool # yum install -y gcc-c++ # yum install z ...
- iOS7(iPhone4)button Can't change button Of title
Recently, a high-end iPhone4 test machine , System is iOS7.1, A problem was detected , Two button, The second enable by NO, Click on the first button, The second title change , However, in iPhone4 It doesn't work on the computer , ...
- SecureCRT Chinese code scrambling
1. Modify remote linux Configuration of the machine [root@rhel ~]#vi /etc/sysconfig/i18n hold LANG To support UTF-8 Character set for Such as : LANG=”zh_CN.UTF-8″ Or is it L ...
- file Of name value
stay picturelibrary Take one of them jpg file , Its Name The value is "NoThumbnail.jpg", Pay attention to the back .jpg foreach (SPFile ...
- Completely backpack （ Nanyang oj311）（ Completely backpack ）
It's all backpacks The time limit :3000 ms | Memory limit :65535 KB difficulty :4 Description and narration Say the meaning of the topic directly , The definition of backpack is N Class items and a capacity of V The backpack . Each item has an unlimited number of items available . The first i The size of the species is c. value ...
- use py2exe take python File conversion to exe Executable program
1. Installation is required first py2exe modular , Download address :http://www.lfd.uci.edu/~gohlke/pythonlibs/ And then use pip install Command to install py2exe modular , If you use it py ...
- struts2 Type conversion related issues
One . Type conversion error , How to deal with it ? if Action Class does not implement ValidationAware Interface , When type conversion error occurs ,struts2 Will continue to call action Method , Set the property value to the default value , Don't complain . if Action class ...
- Tomcat The kernel Tomcat Class loader for
With other mainstream Java Web The server is the same ,Tomcat There are also different custom class loaders , Achieve the control of a variety of resources . Generally speaking ,Java Web The server needs to solve the following four problems : ① The same Web In the server , each Web ...