עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיה בJAVASCRIPT

Featured Replies

פורסם

שלום

אני רוצה שברגע שאני לוחץ על מספר אז הוא יופיע לי למטה

יש שתי בעיות :

1. המספר יוציא לי תמיד המספר האחרון(31) ולא המספר שאני לוחץ עליו.

2. זה מוחק לי את התאריכון וכותב במקומו אני רוצה שזה יכתוב מתחתיו.

הנה הקוד:


<html>
<head>


</head>

<body>

<br>
<br>
<script>

function on()
{
document.write(i);
}

document.write("<table border=2>")
x=0;
for (i=1; i<=30; i++)
{
x=x+1;

if (x==0){
          document.write("<tr>")
         }
document.write("<td height=40 width=40>")
document.write("<font size=6 color=#6633FF>")
document.write("<a onclick=on()>"+i+"</a>")


document.write("</td>")

if (x==7)
    {
    document.write("</tr>")
    x=0;
    }

}


document.write("</table>")

</script>



</body>

</html>

פורסם

30-1 מתחלק ב- 7?

אני ממליץ לך לעבוד עם I בלבד ועם שארית % וכל פעם שיש לך שארית 0 תסגור TR ותפתח חדש. ובהתחלה כשאתה יוצר את הטבלה תיצור גם TR ובסוף כשאתה סוגר אותה תסגור TR.

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.