עבור לתוכן
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.

מבקש עזרה בכלי לחישוב זמן.

Featured Replies

פורסם

הרכבתי ב-javascript קוד לחישוב זמן, שעות דקות ושניות,

אשר אותו הייתי רוצה בתור אפלקציית C או VB ככלי לשימוש.

הנה קוד ה-javascript, אשמח אם חבר כאן יוכל לשלב זאת.

העניין הוא ליצור מחשבון זמן, לדוגמא 1:22:04 ועוד 00:01:15 יהיה שווה 1:23:19

גללו את הקוד על דף HTML.

בתודה.

-------------------------------------------------------------------------------------------------------------------

<html dir=rtl>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

<!--

function addValues (value) {

var myForm = document.timeCalculator;

if(myForm.total_time.value.length > 0){

var the_hours = parseInt(myForm.total_time.value.substring(0,myForm.total_time.value.indexOf(":")));

var the_minutes = parseInt(myForm.total_time.value.substring(myForm.total_time.value.indexOf(":")+1,myForm.total_time.value.lastIndexOf(":")));

var the_seconds = parseInt(myForm.total_time.value.substring(myForm.total_time.value.lastIndexOf(":")+1,myForm.total_time.value.length));

}

else{

var the_hours = 0;

var the_minutes = 0;

var the_seconds = 0;

}

var form_hours = parseFloat(myForm.frm_hours.value);

var form_minutes = parseFloat(myForm.frm_minutes.value);

var form_seconds = parseFloat(myForm.frm_seconds.value);

if (isNaN(form_hours)) {form_hours = 0;}

if (isNaN(form_minutes)) {form_minutes = 0;}

if (isNaN(form_seconds)) {form_seconds = 0;}

myForm.frm_hours.value = form_hours;

myForm.frm_minutes.value = form_minutes;

myForm.frm_seconds.value = form_seconds;

form_seconds = (form_hours * 60 * 60) + (form_minutes * 60) + form_seconds;

form_hours = 0; form_minutes = 0;

while(form_seconds >= 60){form_seconds = form_seconds - 60;form_minutes++;}

while(form_minutes >= 60){form_minutes = form_minutes - 60;form_hours++;}

the_hours = value * form_hours + the_hours;

the_minutes = value * form_minutes + the_minutes;

the_seconds = value * form_seconds + the_seconds;

while(the_seconds >= 60){the_seconds = the_seconds - 60;the_minutes++;}

while(the_minutes >= 60){the_minutes = the_minutes - 60;the_hours++;}

while(the_seconds < 0){the_seconds += 60;the_minutes--;}

while(the_minutes < 0){the_minutes += 60;the_hours--;}

the_seconds = Math.round(the_seconds *10000)/10000;

myForm.total_time.value = "" + the_hours + ":" + the_minutes + ":" + the_seconds;

var tempDecimal = the_hours + (the_minutes / 60) + (the_seconds / 60 / 60);

tempDecimal = Math.round(tempDecimal *10000)/10000;

myForm.total_time_decimal.value = "" + tempDecimal + " שעות";

}

function resetValues(){

var myForm = document.timeCalculator;

myForm.frm_hours.value = "";

myForm.frm_minutes.value = "";

myForm.frm_seconds.value = "";

myForm.total_time.value = "0:0:0";

myForm.total_time_decimal.value = "0 שעות";

}

// -->

</script>

<form name="timeCalculator">

<div align="center"><center><table border="0">

<tr>

<td colspan="3"><font color="#800000">הכנס שעה, דקה ושניה, ניתן להכניס גם בנפרד.</font></td>

</tr>

<tr>

<td align="center">שעות<br>

<input TYPE="text" SIZE="7" NAME="frm_hours"></td>

<td align="center">דקות<br>

<input TYPE="text" NAME="frm_minutes" SIZE="7"></td>

<td align="center">שניות<br>

<input TYPE="text" NAME="frm_seconds" SIZE="7"></td>

</tr>

<tr>

<td colspan="3" align="center"><a href="javascript:addValues(1)">הוסף לחישוב</a>  |

  <a href="javascript:addValues(-1)">הסר מהסכום</a>  |  <a

href="javascript:resetValues();">אפס חישוב</a></td>

</tr>

<tr>

<td colspan="3">סה"כ: <input type="text" name="total_time" size="10" maxlength="10" value="0:0:0" READONLY></td>

</tr>

<tr>

<td colspan="3">דצימלי: <input type="text" name="total_time_decimal" size="15" maxlength="10" value="0 שעות" READONLY></td>

</tr>

</table>

</center></div>

</form>

</html>

-------------------------------------------------------------------------------------------------------------------

פורסם

בואנה התחרפנת לגמרי ?

יש לך פונקציה שמחליפה את כל הקוד המטורף שכתבת שם

ב- vbscript למשל זה DateAdd

ובכל שפה נורמלית אחרת גם יש פונקציות דומות

פורסם
  • מחבר

אני לא מעוניין בתיכנות צד שרת.

אני מעוניין בכלי שרץ כ-EXE , תודה.

ואם אפשר קצת פחות גשמיות בתגובה, אודה לך.

פורסם

לא משנה צד שרת, exe בכל שפה יש לך את זה בפקודה , חבל להמציא הגלגל מחדש

ארכיון

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

דיונים חדשים

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.