Chapter 3 dom
Dom is the abbreviation of "Document Object Model" (Document Object Model.
Node
Element Node: it is the DOM atom. For example, the name of a text paragraph element is the name of the P unordered list element ul... [the attribute
Object-oriented javascript: using the 'prototype' Property
Since JavaScript 1.1, it has a built-in object called prototype. It can be used to expand JavaScript and write custom attributes and methods on objects. For example. The following is a
Http://www.vvorld.cn
CopyCodeThe Code is as follows:
I don't know how xiaoqin has used it. I used a self-made debugging tool (similar to firedebug). There are countless tools like this, which are hard to prevent.
In fact, there is such a method
If you do not understand the reason, do not worry. go deep into the CSS rules and take a look at using CSS to fix anything: 20 + Common Bugs and fixes.Article.
If the previous article does not help you, you can use one of the following 12
Consider the following
Code
If (node. nextsibling. classname = ...){...}If node or node. nextsibling is null, an error is returned ). Therefore, the common solution code is
If (node) & (next = node. nextsibling )&&...){...}Then, when multiple
1. What is Dom?
What is Dom? Dom is a Document Object Model (Document Object Model), a set of API Interfaces Based on browser programming (in this tutorial, it can be said that it is DHTML programming). W3C introduces the Recommendation Standard,
The control block in the middle is actually an IFRAME, which defines its width as 10.
Then, in his internal JS, control the left and right two IFRAME.
CopyCode The Code is as follows: function switchsysbar (){
If (parent.doc ument.
An article on "translated words"
Article It is reported that the Javascript of various browsers is compared. As a javascript developer, I personally pay more attention to this matter. I still trust sunspider in the test area, as the original
The specific requirements are as follows:
1. The date table is filled horizontally.
2. The date list of each month is displayed in a horizontal row, instead of displaying a square like many date controls on the Internet.
3. Only the year, month, and
You may say that if you do not translate the reference materials recommended in it, it is all in vain, but what matters isArticleThe Learning ideas provided by the author.For more information, seeGoogleThe Chinese version of the corresponding
Implementation content: truncate a section containing HTML
Code But there is no issue that the containment mark is not closed.
PHP version addressThe core part is as follows:Copy codeThe Code is as follows: function generate_brief (text, length
process name form name upload attachment operation Application Form 1 Application Form not allowed Delete ticket 2 Application Form not allowed Delete Leave 3 Application Form not allowed Delete ticket 4
Instructions for use:
ProgramRelatively simple,CodeThere are instructions in this section. Here we will talk about how to use it.First, instantiate a calendar and set parameters.Parameter description:Year: Year to be displayedMonth: The month to
Normally, window. Print () is used to print the entire page. However, if you need to print part of the content defined in the web page, you can use the following method:
1. on the page
CodeAdd JavaScript to the header:
JavaScript code
Copy
Here I will briefly discuss the coding problems that often occur in the daily work of front-end HTML and JavaScript.
In the computer, the information we store is represented by binary code. What we know, the English and Chinese characters displayed
Click () object. Click () enables the object to be clicked.
Whether the closed object window has been closed; true/false
Cleartimeout (object) clears the set setTimeout object
Clearinterval (object) clears the set setinterval object
The confirm
The Screen Object reflects the screen settings of the current user.Width returns the screen width (number of rows ).Height returns the screen height.Availwidth returns the available width of the screen (excluding the width occupied by some things
CopyCode The Code is as follows: var STR = "hello ";
STR + = "world ";
Background work:1) create a string that stores "hello" and point STR to it.2) create a string for storing "world.3) create a string for storing the result.4) copy the current
The with statement specifies the default object for one or more statements.
Usage:
With () ;
The with statement is usually used to shorten the number
Code Quantity. In the following example, pay attention to the reuse of Math:
X = math. Cos (3 *
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.