ניסוי.html

מתוך ויקי נטפרי
גרסה מ־14:42, 10 במרץ 2026 מאת משתמש חו"ל (שיחה | תרומות) (ניסוי)
(הבדל) → הגרסה הקודמת | הגרסה האחרונה (הבדל) | הגרסה הבאה ← (הבדל)
קפיצה לניווט קפיצה לחיפוש

<!DOCTYPE html> <html lang="he"> <head>

 <meta charset="UTF-8">
 <title>הצגת פרמטרים</title>
 <style>
   body {
     font-family: Arial, sans-serif;
     direction: rtl;
     padding: 20px;
     background-color: #f9f9f9;
   }
   h1 {
     color: #333;
   }
   table {
     width: 50%;
     border-collapse: collapse;
     margin-top: 20px;
   }
   th, td {
     border: 1px solid #aaa;
     padding: 8px 12px;
     text-align: right;
   }
   th {
     background-color: #eee;
   }
 </style>

</head> <body>

פרמטרים מה-URL

פרמטר ערך
 <script>
   const params = new URLSearchParams(window.location.search);
   const table = document.getElementById('paramsTable');
   if ([...params].length === 0) {
     const row = table.insertRow();
     const cell = row.insertCell();
     cell.colSpan = 2;
     cell.textContent = "אין פרמטרים ב-URL";
   } else {
     params.forEach((value, key) => {
       const row = table.insertRow();
       const keyCell = row.insertCell();
       const valueCell = row.insertCell();
       keyCell.textContent = key;
       valueCell.textContent = value;
     });
   }
 </script>

</body> </html>