Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="ar">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>التاريخ والساعة الحالية</title>
- <style>
- body {
- font-family: Arial, sans-serif;
- text-align: center;
- margin-top: 50px;
- }
- </style>
- </head>
- <body>
- <h1>التاريخ والساعة الحالية</h1>
- <p id="date"></p>
- <p id="time"></p>
- <script>
- function updateDateTime() {
- const options = { year: 'numeric', month: 'long', day: 'numeric' };
- const today = new Date().toLocaleDateString('en-US', options);
- document.getElementById('date').innerText = today;
- const time = new Date().toLocaleTimeString('en-US');
- document.getElementById('time').innerText = time;
- }
- updateDateTime();
- setInterval(updateDateTime, 1000); // تحديث الساعة كل ثانية
- </script>
- </body>
- </html>
- <html lang="ar">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>أدوات النص</title>
- <style>
- body {
- font-family: Arial, sans-serif;
- margin: 20px;
- background-color: #f4f4f4;
- }
- #toolbar {
- margin-bottom: 20px;
- }
- button {
- margin-right: 5px;
- }
- #text-area {
- width: 100%;
- height: 300px;
- padding: 10px;
- font-size: 16px;
- }
- </style>
- </head>
- <body>
- <div id="toolbar">
- <button onclick="saveNotes()">💾 حفظ</button>
- <button onclick="exportPage()">تصدير الصفحة</button>
- <button onclick="exportWorkbook()">تصدير كل الصفحات</button>
- <button onclick="printPage()">طباعة</button>
- <button onclick="insertLink()">🔗 إدراج رابط</button>
- <button onclick="highlightText()">🟨 تمييز النص</button>
- <button onclick="indentQuote()">💬 اقتباس</button>
- <button onclick="clearFormatting()">❌ مسح التنسيق</button>
- <button onclick="toggleDarkLightMode()">🌗 الوضع المظلم/الفاتح</button>
- </div>
- <textarea id="text-area"></textarea>
- <script>
- function saveNotes() {
- const notes = document.getElementById('text-area').value;
- localStorage.setItem('savedNotes', notes);
- alert('تم حفظ الملاحظات!');
- }
- function exportPage() {
- const content = document.getElementById('text-area').value;
- const blob = new Blob([content], { type: 'text/html' });
- const url = URL.createObjectURL(blob);
- const a = document.createElement('a');
- a.href = url;
- a.download = 'export.html';
- document.body.appendChild(a);
- a.click();
- document.body.removeChild(a);
- }
- function exportWorkbook() {
- // تنفيذ خاصية تصدير جميع الصفحات هنا
- alert('تصدير جميع الصفحات غير مفعل بعد.');
- }
- function printPage() {
- window.print();
- }
- function insertLink() {
- const url = prompt('أدخل رابط الويب:');
- const text = prompt('أدخل النص للعرض:');
- const textArea = document.getElementById('text-area');
- textArea.value += ` [${text}](${url}) `;
- }
- function highlightText() {
- // إضافة منطق لتظليل النص المحدد
- alert('تمييز النص غير مفعل بعد.');
- }
- function indentQuote() {
- const textArea = document.getElementById('text-area');
- textArea.value += '\n> ';
- }
- function clearFormatting() {
- const textArea = document.getElementById('text-area');
- textArea.value = textArea.value.replace(/\*\*(.*?)\*\*/g, '$1')
- .replace(/_(.*?)_/g, '$1');
- }
- function toggleDarkLightMode() {
- document.body.classList.toggle('dark-mode');
- if (document.body.classList.contains('dark-mode')) {
- document.body.style.backgroundColor = '#333';
- document.body.style.color = '#fff';
- } else {
- document.body.style.backgroundColor = '#f4f4f4';
- document.body.style.color = '#000';
- }
- }
- </script>
- </body>
- </html>
Advertisement