We often see that many articles on the website can customize the font size and medium size. Below I would like to recommend a js control text display code for you. If you need it, you can refer to it.
Javascript control text display
The
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,
The kindeditor editor does not contain blockquote tags by itself. If you need to add tags, You need to modify them by yourself, next, I will introduce you to the steps for adding blockquote tags to the kindeditor editor in eblog. For more
This article introduces the UEditor cross-origin File Upload implementation method. Many users encounter cross-origin problems when using the UEditor, leading to the inability to send images, the reason is that the src cross-origin in iframe is
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,
In js, the most common code for converting arrays and strings is to use the join and split functions for operations. This is somewhat similar to array and character conversion in php and asp, next I will introduce the operation methods in js.
Method
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
Some time, we do not want the editor to have online management functions. For example, our message board certainly does not want other users to directly have online image management functions. How can we delete these functions, the following article
There are two common methods to use ajax in js: the original XMLHttpRequest method and the popular Jquery ajax method. I will introduce them here.
For Ajax, the core object is XMLHttpRequest. All Ajax operations cannot be separated from operations
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.
There are many methods for clearing data in js. Below I will introduce several methods for clearing data, which can be used to compare with the performance of various array clearing methods. For more information, see.
Clearing the array is a common
In js, the window or page cannot be judged. close () function, but if you want to be compatible with all browsers to close the current window, you do not directly use window. close.
Windows built-in Methods
Window. close ()
The Code is as
In js, it is easy to directly use window to achieve page Jump. location. href can be implemented. If you want to perform a scheduled jump, you need to use the setTimeout Function to set a scheduled jump. I will summarize it for you.
The following is
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, '
The principle of private instance variables is based on the scope. Private instance variables are implemented using the var keyword in JavaScript Functions and only valid within functions.
If you have been familiar with other languages, you should
Arrays are an important data storage type in javascript. Next I will summarize how to create, define, delete, and modify an array length instance in js.
Define an array
The Code is as follows:
Copy code
Var a = new Array ("a",
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.
Next I will introduce you to an instance method for blocking event bubbling on the dom object. I hope this method will be helpful to all of you.
Events bound to dom objects have the feature of bubbling. If you do not want the event to bubble up, you
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,
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.