Js drag prototype declaration and usage summary, js drag prototype Declaration

Source: Internet
Author: User

Js drag prototype declaration and usage summary, js drag prototype Declaration

The following is a self-written prototype declaration about js Drag and Drop: the code is as follows:

Notes:

1. Point this to who it actually points to-find out the object it refers

2. Use of the call () method

3. What is the difference between assigning a parent prototype to a child level directly and assigning it to a child level using?

For example:

For (var I in Drag. prototype) {LimitDrag. prototype [I] = Drag. prototype [I]; ---------- THE CHILD level is changed and its parent level is not affected} LimitDrag. prototype = Drag. prototype; --------- directly assigning the prototype to the sub-level will cause the parent level to change when the sub-level changes.

The Code is as follows:

<Html> 

The above is all the content of this article, hoping to help you learn.

Articles you may be interested in:
  • Javascript supports firefox, ie7 page layout, drag-and-drop effect code
  • The offsetLeft, offsetTop, offsetWidth, and offsetHeight attributes of Javascript drag-and-drop articles 2
  • JQuery Dialog (JS modal window, DIV that can be dragged)
  • About js drag-and-drop upload [a drag-and-drop upload process for modifying an avatar]
  • Js prototype chain principles
  • Div drag plug-in -- JQ. MoveBox. js (self-made JQ plug-in)
  • Javascript drag and drop upload class library DropzoneJS usage
  • Js perfect div drag-and-drop instance code
  • Javascript Implementation of moving a child form by dragging the mouse
  • JS object-oriented basic explanation (factory mode, constructor mode, prototype mode, hybrid mode, dynamic prototype mode)

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.