// 通用JavaScript功能
function showNotification(message, type = 'success') {
const notification = document.createElement('div');
notification.className = `fixed top-4 right-4 p-4 rounded-lg shadow-lg z-50 ${
type === 'success' ? 'bg-green-500' : 'bg-red-500'
} text-white transition-all duration-300 transform translate-x-full`;
notification.textContent = message;
document.body.appendChild(notification);
setTimeout(() => {
notification.classList.remove('translate-x-full');
}, 100);
setTimeout(() => {
notification.classList.add('translate-x-full');
setTimeout(() => {
document.body.removeChild(notification);
}, 300);
}, 3000);
}
// 页面加载完成后的初始化
document.addEventListener('DOMContentLoaded', function() {
console.log('JSP模板系统初始化完成');
});

