Angularjs input box value, selected

Source: Internet
Author: User

That is, the previous write carriage return "about ANGULARJS frame input press Enter event cursor jumps to another input", followed by the input box value, is selected.
Personally feel that the instructions in the ANGULARJS is very good, in the HTML a lot of validation will be used, but, more write.

The following code is implemented:

/**--------------The command press the Enter event, click the value of the event "check" box-----------* /    Module. directive (' SelectLine ', function () {return{Restrict:' A ', Link: function (scope, element, attrs) {//element.bind (' MouseOver ', function(event) {//the mouse slides to the data, select//this.Select();                //}); Element.bind (' click ', function(event) {//Click to select this.Select();                }); Element.bind (' Focus ', function(event) {//When getting focus, select this.Select();            });    }        }; });

Angularjs input box value, selected

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.