A few days ago, I wrote two bookmarklet----"Short URL generation" and "Short URL restore".
They are very convenient to use, besides myself, other friends are using it. The first time to release bookmarklet, you can have users, I am quite satisfied.
The following is my collation of the "Bookmarklet writing guide" for their own and need friends for reference.
One, what is Bookmarklet?
Bookmarklet is a compound word, consisting of a bookmark (bookmark) and a-let (small), which can be translated into a "bookmark tool".
It is in the form of "bookmarks" and is stored in the browser Favorites folder. However, it's not a URL that starts with "http://," but a piece of JavaScript code that starts with "javascript:". After clicking, an action is performed on the current page.
It usually appears as a link in the Web page, as follows:
<a href= "Javascript:alert (' Hi ');" >xxx</a>
Users can simply drag the link to the Address bar or favorite folder.
Second, the advantages of bookmarklet
It has several notable advantages, and other technologies are hard to replace:
1. Fast Installation
Bookmarklet installation, is to save a piece of code in the Favorites folder, one step can be completed. All browsers are natively supported.
2. Easy to use
Use the time, click this link on the line.
3. Easy to develop
A piece of JavaScript code is all the content of the bookmarklet, no need to use other technology, than the development of a browser plug-in is much simpler.
4. Cross-browser
All browsers support Bookmarklet. If written correctly, the same bookmarklet can be used in a variety of browsers.
This column more highlights: http://www.bianceng.cn/webkf/tools/