SRT字幕转文本

提取SRT字幕纯文本:去除时间轴与序号,便于整理与分享。

拖放SRT文件到此处

或点击选择SRT字幕文件

仅支持 .srt 格式的字幕文件
所有处理均在本地完成,文件不会上传

' + safeTitle + '' + '
' +
        escapedText +
        '
'; const blob = new Blob([htmlContent], { type: 'application/msword;charset=utf-8' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `${safeTitle}_文本.doc`; document.body.appendChild(a); a.click(); setTimeout(() => { URL.revokeObjectURL(url); a.remove(); }, 0); showToast(getI18nText('toolPage.messages.wordExportSuccess', 'Word 文件导出成功'), 'success'); } function escapeHtml(str) { return String(str) .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } function resetTool() { originalContent = ''; convertedText = ''; currentFileName = ''; resultSection.classList.add('hidden'); uploadSection.classList.remove('hidden'); } function showToast(message, type = 'info') { toast.className = 'fixed bottom-4 left-1/2 transform -translate-x-1/2 px-4 py-2 rounded-lg text-sm z-50'; switch(type) { case 'success': toast.classList.add('bg-success', 'text-white'); break; case 'error': toast.classList.add('bg-danger', 'text-white'); break; default: toast.classList.add('bg-gray-700', 'text-white'); } toast.textContent = message; toast.classList.remove('hidden'); setTimeout(() => { toast.classList.add('hidden'); }, 3000); } document.addEventListener('DOMContentLoaded', initEventListeners);