Angularjs Ng-blur instructions and simple examples _angularjs

Source: Internet
Author: User

Angularjs Ng-blur Instruction

Angularjs instance

Executes an expression when the input box loses focus (onblur):

<! DOCTYPE html>
 
 

Run Result:

0

The count variable in the instance records the number of times the focus has been lost.

Definitions and usage

The ng-blur directive is used to tell angularjs the expression that the HTML element needs to execute when it loses focus.
The Ng-blur directive in ANGULARJS does not overwrite the native onblur event, and if the event is triggered, the Ng-blur expression is executed with the native onblur event.

Grammar

<element ng-blur= "expression" ></element>

<a>, <input>, <select>, <textarea> Window object support.

Parameter values

value Description
Expression An expression to execute when the focus is lost.

Above is the angularjs ng-blur instruction Knowledge Simple explanation, the follow-up continues to add, thanks support!

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.