Use JavaScript to create powerful GUIs (1)

Source: Internet
Author: User
Tags object interface object model client
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



Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.