Create
Most computer users are very familiar with the graphical user interface (GUI) of Windows, using Word or Microsoft email client software to learn about buttons, toolbars, and tags, but with almost identical interfaces to client software, we can see that the interface of each site is
are not the same. Users need to learn how to use every kind of Internet application. Although most Internet applications are not too complex, a user needs to constantly learn the application interface and feel like a novice, which is not a pleasant thing for users.
By using JavaScript and CSS to build standardized client interface components for an Internet application or Web site, you can use the user's eye to see what they can do and how to do their job. Users will be more confident of their own operations, and will not be prone to misoperation.
Maybe you don't know that JavaScript has this feature, or that you've seen it on other sites, but you don't know how it's done. In this article, we'll discuss how to create a simple, formatted toolbar (as in Word) that can add functionality to any Web site that lets users feedback through the <textarea> area. The techniques presented in this article require the reader to have knowledge of HTML, CSS, and JavaScript.
A little bit of inadequacy
The following code uses the Createrange () method of the Selection object, unfortunately, only ie4+ users on the Windows platform can use the Selection object, and similar functionality is achieved through the Document Object Model (DOM). However, Document.createrange () in Mozilla can be problematic, mainly in the input or textarea elements of the text data can not be processed. If this bug is resolved, the following code can be run on Mozilla, Netscape 6+, or any other browser platform running gecko.
Create a simple toolbar