Zum Hauptinhalt springen
';
html += '';
html += '符号: chmod ' + symbolic + '
';
html += '命令: chmod ' + octal + ' filename
';
html += '说明: ' + perms.map(function(p, i) { var labels = ['所有者 (u)', '用户组 (g)', '其他人 (o)']; return labels[i] + ': ' + (p[0]?'读 ':'') + (p[1]?'写 ':'') + (p[2]?'执行':''); }).join('
');
html += '
';
resultContent.innerHTML = html;
resultMeta.textContent = 'chmod ' + octal;
resultArea.classList.add('show');
});
document.getElementById('btn-clear').addEventListener('click', function() { document.querySelectorAll('.perm').forEach(function(c, i) { c.checked = [0,1,1,1,0,0,0,0,0][i] == 1; }); clearError(); clearResult(); });
})();