SetTimeout (code, millisec) method. If the code of the 1st parameter calls the function name directly, a global or local function call problem exists. Note the following when using the setTimeout (code, millisec) method:
SetTimeout (expression,
This article will show you how to set default values for function parameters in Javascript. For more information, see
In php, I can write it like this.
The Code is as follows:
Copy code
Function abcccc ($ a = 1, $ B = 2
I have collected two good js instances to add and delete table row tr instances. For more information, see. I hope this method will help you all.
Example 1
The Code is as follows:
Copy code
js insert delete talbe row A0 B0
After scrolling to the specified position, we will fix the effect on the left, right, or top or bottom. Next I will introduce three fixed display effects codes after scrolling to a certain position, for more information, see.
Fixed display after js
If we want to define a carriage return event, we must bind the event like jquery. We use addEventListener and attachEvent to bind the event in pure js. They do not use ie or ff browsers respectively.
For example, bind a carriage return event.
This article will introduce you to the new Code of the TreeView in javascript. If you need to know about it, you can refer to it.
Example 1
The Code is as follows:
Copy code
Function public_GetParentByTagName (element,
This article describes how to assign the content in the kindeditor editor to the textarea method when submitting a form through Ajax. For more information, see.
KindEditor cannot get the textarea text box value in Firefox or other browsers.
First,
In js, window. open () function is the most frequently used window operation. Next we will introduce various operations in js window. If you need to know about it, you can refer to it.
Open a window in HTML
We already know how to open a window in
This article will introduce the document. createElement usage in js and compatibility with some different browsers.
W3C DOM Level2 Core stipulates that the createElement method under the Document interface can create an Element Node object instance.
Sometimes we can see that some websites can record the access time when you enter the website and leave the website. Below I will use js to write a few simple methods, for your reference.
Instance 1
The Code is as follows:
Copy code
When developing a website in the background, we often need to click exit or timeout to automatically jump out of our current framework page. We can solve this by using many methods, next I will introduce some methods for jumping out of the framework.
Today, I was told by A friend that I didn't add A window in the title of "A". How can I open all the pages on the page on the new page? I found several practical methods, my personal favorite is the last method.
The first method is implemented using
When it comes to webpage incompatibility in various browsers, we usually handle the problem by judging the browser and then writing different JS or CSS styles, below are some common browser judgment js:
Windows operating system browser series:
IE
Today, when I read the javascript advanced Program Design book, I saw an article on the security scope. Next I will write about the security scope usage of js constructor based on my own knowledge.
Let's take a test. The summary is as
The regular expression matches the email address [\ w] + @ [\ w] +. [\ w] {2, 3} \ w to match any word characters including underlines. It is equivalent to \ '[A-Za-z0-9 _] \'. + Match the previous subexpression once or multiple times.
For example, '
This article describes whether to check the IE instance code. It can be judged by js or jquery. Next I will introduce it separately.
Js determines whether it is IE
The Code is as follows:
Copy code
Function isMSIE (){Var
This article will introduce the usage of string objects in detail. If you need to know about js string objects, you will not be able to refer to them.
The Code is as follows:
Copy code
Var a = "abcDEfGgdefg32asdf38 ";Document.
This article will introduce some examples of javascript blocking bubble and browser default behavior. I hope some methods will be helpful to you.
When using javascript programming, you may encounter a problem, that is, when you add an event to html,
Some may find that the value of FCKeditor1 cannot be obtained after the KindEditor editor is upgraded. I will introduce the solution to this problem.
Code for getting values
The Code is as follows:
Copy code
The above
We can see that many websites return the top result when the scroll bar reaches the specified position. Otherwise, it will be automatically hidden, next, I will introduce the Implementation Principles and Examples of this effect.
When the visible
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service