弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the
兼容性表格
at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
dropzone
global attribute
is an enumerated attribute indicating what types of content can be dropped on an element, using the
HTML 拖放 API
. It can have the following values:
copy
, which indicates that dropping will create a copy of the element that was dragged.
move
, which indicates that the element that was dragged will be moved to this new location.
link
, which will create a link to the dragged data.
| 规范 | 状态 | 注释 |
|---|---|---|
|
HTML 5.1
The definition of 'dropzone' in that specification. |
推荐 | 快照 HTML 实时标准 , initial definition |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
dropzone
实验性
|
Chrome
不支持
? — 58
Prefixed
|
Edge 不支持 No | Firefox 不支持 No | IE 不支持 No |
Opera
不支持
? — 45
Prefixed
|
Safari 不支持 No |
WebView Android
不支持
? — 58
Prefixed
|
Chrome Android
不支持
? — 58
Prefixed
|
Firefox Android 不支持 No |
Opera Android
不支持
? — 43
Prefixed
|
Safari iOS 不支持 No |
Samsung Internet Android
不支持
? — 7.0
Prefixed
|
不支持
实验。期望将来行为有所改变。
要求使用供应商前缀或不同名称。
<a>
<abbr>
<acronym>
<address>
<applet>
<area>
<article>
<aside>
<audio>
<b>
<base>
<basefont>
<bdi>
<bdo>
<bgsound>
<big>
<blink>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center>
<cite>
<code>
<col>
<colgroup>
<command>
<content>
<data>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir>
<div>
<dl>
<dt>
<element>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font>
<footer>
<form>
<frame>
<frameset>
<h1>
<head>
<header>
<hgroup>
<hr>
<html>
<i>
<iframe>
<image>
<img>
<input>
<ins>
<isindex>
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<listing>
<main>
<map>
<mark>
<marquee>
<menu>
<menuitem>
<meta>
<meter>
<multicol>
<nav>
<nextid>
<nobr>
<noembed>
<noframes>
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<picture>
<plaintext>
<pre>
<progress>
<q>
<rb>
<rp>
<rt>
<rtc>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<shadow>
<slot>
<small>
<source>
<spacer>
<span>
<strike>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<template>
<textarea>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt>
<u>
<ul>
<var>
<video>
<wbr>
<xmp>
<input>
类型
<input type="button">
<input type="checkbox">
<input type="color">
<input type="date">
<input type="datetime">
<input type="datetime-local">
<input type="email">
<input type="file">
<input type="hidden">
<input type="image">
<input type="month">
<input type="number">
<input type="password">
<input type="radio">
<input type="range">
<input type="reset">
<input type="search">
<input type="submit">
<input type="tel">
<input type="text">
<input type="time">
<input type="url">
<input type="week">