all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

draggable attribute | draggable property

Sets or gets whether an element can be dragged on a document.

This property is read/write.

Syntax

HTML
<element draggable="bDraggable" ... >
JavaScript
object.draggable = bDraggable
bDraggable = object.draggable

Property values

Type: boolean

True when attribute is present, false when missing.

Remarks

Prior to the current version of the client, only links and images were draggable on a web document. This attribute allows any element to be draggable.

Note  For code samples, see Form controls part 1 and Form controls part 2: validation on the a Windows Store app using JavaScript sample site.

See also

HTMLElement

 

 

Show:
© 2014 Microsoft