Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 40ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
d

dynamic-list

Recently created Least recently created Recently updated Least recently updated

timmy / SortableJS 進階拖放排序

Last active 5 hours ago dom-manipulation drag-and-drop dynamic-list html javascript sortablejs ui-interaction

本範例展示如何使用 SortableJS 來實現可拖放排序功能,並即時顯示更新後的順序,適用於動態 UI、可視化管理、任務清單與數據重組等應用。

0 0 0 1
1 <!DOCTYPE html>
2 <html lang="zh-TW">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>SortableJS 進階範例</title>
7 <style>
8 .list {
9 list-style: none;
10 padding: 0;