@דוד-יצחק
אתה משנה דברים…
אל תשנה בלי שאתה יודע קצת j.s
אפשר להתחיל ללמוד…
שולח לך קוד תקין אם תעשה העתק הדבק-זה יעבוד.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<title>.:Title of page:.</title>
<style>
div{
display: none;
}
</style>
</head>
<body>
<select onchange="displayDiv()" id="select">
<option value="" selected>בחר תאריך...</option>
<option value="01">01</option>
<option value="02">02</option>
</select>
<div id="01">
<table dir="rtl" border="2" class="table">
<tr><th colspan="6"><h2 class="h2">
רשימת הספרים הנלקחים מהספרייה
</h2></th></tr>
<tr>
<th></th>
<th>שם</th>
<th>תאריך</th>
<th>ספרים</th>
<th>הוחזר</th>
<th>מספר טלפון</th>
</tr>
</table>
</div>
<div id = '02'>
2 זה דיב מספר
</div>
<script>
function displayDiv() {
let divs = document.querySelectorAll('div')
let select = document.querySelector('#select').value
divs.forEach(div => {
if (div.id === select){
div.style.display='block'
} else {
div.style.display = 'none'
}
})
}
</script>
</body>
</html>