Yesterday, we needed to customize the ckeditor editor toolbar and add a plug-in as a requirement. Next I will introduce my recording notes to you, so you can learn it as needed.
1. Download and install ckeditor.
2. Custom toolbar buttons:
You can
In js, the algorithm for retrieving the position of an element on the page is very simple, as long as it is the position of the element on the page = the position of the element relative to the browser window + the value of the browser scroll bar,
Today, I saw some common mouse events on a friend's website. Below I will sort out and keep a record, which will be useful in the future. If you need to know about it, you can refer to it.
General eventsDescription supported by event Browser
OnClick
This article recommends a good floating page advertisement to all of you. The Calling method is simple. You only need to create a div on the page and specify the id, then you can use js var ad1 = new AdMove ('gg1'); ad1.Run.
The Code is as
This article introduces how to compare the efficiency of JavaScript arrays and Object objects for loops. for more information, see
In the past, xiaohang sub (mountain) told me that the multi-purpose object uses fewer array objects, because the
This article describes how to obtain FCK editor information/value assignment in js. For more information, see references.
Editor Information
The Code is as follows:
Copy code
Function getEditorContents (){Var oEditor =
In js, spaces and spaces are two different types of conditions. Spaces occupy one character space. Many programmers can directly submit a space if they enter a few spaces during judgment, to filter spaces in js, we only need to use replace for
When limiting the number input by users in js, our core code is to add the onKeyDown event in testarea, and then write a character judgment function to judge the field. value. the length is greater than the character length we set. If yes, substring
In js, there is no such thing as php that can be used directly to sort data randomly. Here we will write a custom random array sorting function.
There are many ways to randomly arrange javascript arrays. The following is a simple method:
In js, if we want to encode the url, the commonly used functions include escape, encodeURI, and encodeURIComponent. The corresponding three decoding functions are: unscape, decodeURI, and decodeURIComponent, next we will introduce the conversion
Here we will introduce the regular assignment of values to the specified div. We can use the setInterval or setTimeOut Function to execute the ajax function, so that we can refresh the function in a few seconds, let's look at the instance.
Example
The core statement for getting the value of the drop-down list using js is: document. getElementById (id). options [Objsel. selectedIndex]. value;, but jquery is simpler.
Js to get the value of the drop-down list
The Code is as follows:
There are many ways to judge the version number of IE browser using js. I will introduce three related instances below. I recommend using the last concise version to judge IE browser. The most comprehensive method is the second.
In today's project,
If you are a Sina Blog user, you may find that you can tag your post before posting a blog and will not refresh the current page, next, I will introduce how to add tags to the post when publishing a similar Sina Blog article. I hope this method will
If you know a little about JS Code, you will generally knowwindow.location.hrefThis attribute. Use this property to obtain the URL of the page:
window.location.href = window.location.href;
Okay, I tell you, it's so weak. In fact, native JavaScript
Note: The following statement does not support cross-origin ajax, and does not support cross-origin of subdomains./** * */YUI (). use ("io", function (Y ){Var show_info = Y. one ('# show_info ');Var handleSuccess = function (ioId, o ){If (o.
1.doc ument. write (""); Output statement
2. Comments in JS are //
3. The traditional HTML document sequence is: document-> html-> (head, body)
4. the DOM sequence in a browser window is: window-> (navigator, screen, history, location, document)
5.
Using JavaScript to control css styles allows a webpage to achieve a good user experience or even an animation effect. Efficiency is also taken into account. We usually use the following two methods to write css styles using js:
In general, we use
This article mainly analyzes the imeBindInput function.I found that there are some problems with decompression code on the Internet. Because I have not studied the code compression algorithm, I am not very familiar with decompression, so I have no
I have seen many Javascript slide playback effects in my tutorial at www.bkjia.com. I think it is too complicated. I wrote a simple one myself. The css Filter effect currently does not support the following code for firfox: The image path needs to
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