In JavaScript, the Textarea scroll bar cannot be dragged _ javascript skills

Source: Internet
Author: User
This article describes how to solve the problem that the Textarea scroll bar cannot be dragged in JavaScript. it mainly analyzes the corresponding processing method when the Textarea scroll bar in IE browser is bound to the onfocus event, for more information about how to drag the Textarea scroll bar in JavaScript, see the example in this article. We will share this with you for your reference. The details are as follows:

In IE, have you ever encountered that the scroll bar of Textarea cannot be dragged, but the content can be scrolled by clicking the up or down button?

The cause of this problem is probably that the onfocus event is bound to the Textarea, but the focus is removed (that is, blur () based on a certain condition ()), in this way, the scroll bar cannot be dragged.

A typical example is:

Me. $ input. on ("focus", function () {if ($ isIE & me. enabled = false) me. $ input. blur ();});

When the input control $ input (DOM element I. textarea) is bound to a focus event, and then set to unavailable (! If the focus is lost, the scroll bar cannot be dragged.

I hope this article will help you design JavaScript programs.

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.