Ins 對象對應 HTML <ins> 元素,表示文檔中插入的文本。HTMLElement → Element → Node → EventTarget → Object
無特有屬性/方法,繼承標準 HTMLElement 能力(id、className、style、dataset、事件處理等)。
<del> 展示文檔修訂歷史:<del>舊文本</del><ins>新文本</ins>。ins { text-decoration: underline; }。const ins = document.createElement('ins');
ins.textContent = '新增內容';
ins.dateTime = '2024-01-15T10:30:00Z'; // 標準屬性,指示插入時間
document.body.appendChild(ins);
Ins 對象是語義化標籤 <ins> 的 DOM 映射,無特殊 API,核心價值在於文檔編輯追蹤與無障礙訪問。