Loveuid2008

Untitled

Oct 22nd, 2025
768
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.46 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="ar">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>التاريخ والساعة الحالية</title>
  7.     <style>
  8.         body {
  9.             font-family: Arial, sans-serif;
  10.             text-align: center;
  11.             margin-top: 50px;
  12.         }
  13.     </style>
  14. </head>
  15. <body>
  16.     <h1>التاريخ والساعة الحالية</h1>
  17.     <p id="date"></p>
  18.     <p id="time"></p>
  19.  
  20.     <script>
  21.         function updateDateTime() {
  22.             const options = { year: 'numeric', month: 'long', day: 'numeric' };
  23.             const today = new Date().toLocaleDateString('en-US', options);
  24.             document.getElementById('date').innerText = today;
  25.  
  26.             const time = new Date().toLocaleTimeString('en-US');
  27.             document.getElementById('time').innerText = time;
  28.         }
  29.  
  30.         updateDateTime();
  31.         setInterval(updateDateTime, 1000); // تحديث الساعة كل ثانية
  32.     </script>
  33. </body>
  34. </html>
  35. <html lang="ar">
  36. <head>
  37.     <meta charset="UTF-8">
  38.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  39.     <title>أدوات النص</title>
  40.     <style>
  41.         body {
  42.             font-family: Arial, sans-serif;
  43.             margin: 20px;
  44.             background-color: #f4f4f4;
  45.         }
  46.         #toolbar {
  47.             margin-bottom: 20px;
  48.         }
  49.         button {
  50.             margin-right: 5px;
  51.         }
  52.         #text-area {
  53.             width: 100%;
  54.             height: 300px;
  55.             padding: 10px;
  56.             font-size: 16px;
  57.         }
  58.     </style>
  59. </head>
  60. <body>
  61.  
  62. <div id="toolbar">
  63.     <button onclick="saveNotes()">💾 حفظ</button>
  64.     <button onclick="exportPage()">تصدير الصفحة</button>
  65.     <button onclick="exportWorkbook()">تصدير كل الصفحات</button>
  66.     <button onclick="printPage()">طباعة</button>
  67.     <button onclick="insertLink()">🔗 إدراج رابط</button>
  68.     <button onclick="highlightText()">🟨 تمييز النص</button>
  69.     <button onclick="indentQuote()">💬 اقتباس</button>
  70.     <button onclick="clearFormatting()">❌ مسح التنسيق</button>
  71.     <button onclick="toggleDarkLightMode()">🌗 الوضع المظلم/الفاتح</button>
  72. </div>
  73.  
  74. <textarea id="text-area"></textarea>
  75.  
  76. <script>
  77.     function saveNotes() {
  78.         const notes = document.getElementById('text-area').value;
  79.         localStorage.setItem('savedNotes', notes);
  80.         alert('تم حفظ الملاحظات!');
  81.     }
  82.  
  83.     function exportPage() {
  84.         const content = document.getElementById('text-area').value;
  85.         const blob = new Blob([content], { type: 'text/html' });
  86.         const url = URL.createObjectURL(blob);
  87.         const a = document.createElement('a');
  88.         a.href = url;
  89.         a.download = 'export.html';
  90.         document.body.appendChild(a);
  91.         a.click();
  92.         document.body.removeChild(a);
  93.     }
  94.  
  95.     function exportWorkbook() {
  96.         // تنفيذ خاصية تصدير جميع الصفحات هنا
  97.         alert('تصدير جميع الصفحات غير مفعل بعد.');
  98.     }
  99.  
  100.     function printPage() {
  101.         window.print();
  102.     }
  103.  
  104.     function insertLink() {
  105.         const url = prompt('أدخل رابط الويب:');
  106.         const text = prompt('أدخل النص للعرض:');
  107.         const textArea = document.getElementById('text-area');
  108.         textArea.value += ` [${text}](${url}) `;
  109.     }
  110.  
  111.     function highlightText() {
  112.         // إضافة منطق لتظليل النص المحدد
  113.         alert('تمييز النص غير مفعل بعد.');
  114.     }
  115.  
  116.     function indentQuote() {
  117.         const textArea = document.getElementById('text-area');
  118.         textArea.value += '\n> ';
  119.     }
  120.  
  121.     function clearFormatting() {
  122.         const textArea = document.getElementById('text-area');
  123.         textArea.value = textArea.value.replace(/\*\*(.*?)\*\*/g, '$1')
  124.                                        .replace(/_(.*?)_/g, '$1');
  125.     }
  126.  
  127.     function toggleDarkLightMode() {
  128.         document.body.classList.toggle('dark-mode');
  129.         if (document.body.classList.contains('dark-mode')) {
  130.             document.body.style.backgroundColor = '#333';
  131.             document.body.style.color = '#fff';
  132.         } else {
  133.             document.body.style.backgroundColor = '#f4f4f4';
  134.             document.body.style.color = '#000';
  135.         }
  136.     }
  137. </script>
  138.  
  139. </body>
  140. </html>
Advertisement
Comments
  • okahfou
    2 days
    # text 0.14 KB | 0 0
    1. UPTADE
    2. ⭐⭐ Make 3000$ with Swapzone Exchange Method ⭐⭐
    3. >>> docs.google.com/document/d/1IB4SkLZdU8hex0Kn-GyFHXSSV6kLUXhhOhxPwmEuuc4
Add Comment
Please, Sign In to add comment