Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>הרשמה</title>
- <link href="styles/main.css" rel="stylesheet"/>
- <script>
- function check() {
- if (document.myForm.firstName.value.length < 2) {
- window.alert("השם קצר מידי");
- document.myForm.firstName.focus();
- document.myForm.firstName.select();
- return false;
- }
- else {
- if (document.myForm.lastName.value.length < 2) {
- window.alert("שם המשפחה קצר מידי");
- document.myForm.lastName.focus();
- document.myForm.lastName.select();
- return false;
- }
- else {
- if (document.myForm.id.value.length < 9) {
- window.alert("תעודת הזהות קצרה 9 תווים");
- document.myForm.id.focus();
- document.myForm.id.select();
- return false;
- }
- else {
- if (document.myForm.password.value.length < 8) {
- window.alert("הסיסמה קצרה מ 8 תווים");
- document.myForm.password.focus();
- document.myForm.password.select();
- return false;
- }
- else {
- var checkId = document.myForm.id.value;
- var sum = 0;
- var temp = 0;
- }
- for (var i = 0; i < checkId.length - 1; i++) {
- if (i % 2 === 0) {
- sum += parseInt(checkId.charAt(i));
- }
- else {
- temp = parseInt(checkId.charAt(i)) * 2;
- sum += temp / 10 + temp % 10;
- }
- }
- window.alert(sum);
- sum=parseInt(sum);
- window.alert(sum);
- var checker=10-sum%10;
- window.alert(checker);
- if (sum%10===0&&parseInt(checkId.charAt(8))===0||parseInt(checkId.charAt(8))===checker)
- {
- window.alert("תעודת הזהות בסדר ");
- return true;
- }
- else {
- window.alert("תעודת הזהות אינה קיימת ");
- document.myForm.id.focus();
- document.myForm.id.select();
- return false;
- }
- }
- }
- }
- }
- </script>
- </head>
- <body class="body2">
- <ul>
- <li><a href="#item1" class="bl"> רשום כבר ? כניסה </a></li>
- </ul>
- <table style="background-color: #e2dada ;margin-left:30%; width:767px;margin-top: 5px " >
- <tr>
- <td><img src="styles/photos/logo.png" alt="error" width="200px" height="100px" ></td>
- </tr>
- </table>
- <ul style="margin-left:30%">
- <li><a href="" class="bl">הוסף סידרה בבקשה </a></li>
- <li><a href="#item1" class="bl">ג'אנר </a></li>
- <li><a href="odot.html" class="bl">אודות</a></li>
- <li><a href="favorites.html" class="bl"> מועדפים </a></li>
- <li><a href="gl.html" class="bl">גלריה</a></li>
- <li><a href="index.html" class="bl"> עמוד הבית </a></li>
- </ul>
- <form action="" method="get" name="myForm" onsubmit="return check()">
- <table class="s">
- <tr>
- <td> <input type="text" name="id" value="הכנס תעודת זהות" />תעודת זהות</td>
- </tr>
- <tr>
- <td> <input type="text" name="lastName" value="הכנס שם משפחה" />שם משפחה </td>
- </tr>
- <tr>
- <td> <input type="text" name="firstName" value="הכנס שם פרטי" />שם פרטי</td>
- </tr>
- <tr>
- <td> <input type="password" name="password" value="123456789" />סיסמה </td>
- </tr>
- <tr>
- <td> <input type="text" name="bd" value="הכנס תאריך לידה" />תאריך לידה</td>
- </tr>
- <tr>
- <td >
- ג'אנר אהוב:
- </br>
- <input type="checkbox" name="genre" id="g0" value="comedy"/>קומדיה </br>
- <input type="checkbox" name="genre" id="g2" value="comedy"/>אימה </br>
- <input type="checkbox" name="genre" id="g3" value="comedy"/>אקשן </br>
- <input type="checkbox" name="genre" id="g4" value="comedy"/>מסעות </br>
- <input type="checkbox" name="genre" id="g5" value="comedy"/>פשע </br>
- <input type="checkbox" name="genre" id="g6" value="comedy"/>דרמה </br>
- <input type="checkbox" name="genre" id="g7" value="comedy"/>ביוגרפיה </br>
- <input type="checkbox" name="genre" id="g8" value="comedy"/>דקומנטרי</br>
- </td>
- </tr>
- <tr>
- <td>
- שפה:
- </br>
- <input type="radio" name="geneder" value="male" checked />עברית
- <input type="radio" name="geneder" value="female" />english
- <input type="radio" name="geneder" value="female" />русский
- </td>
- <tr></tr>
- <tr>
- <td>
- <input type="submit" name="submit" value="שלח"/>
- <input type="reset" name="reset" value="נקה"/>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement