עבור לתוכן
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, הנה דרך לבצע זאת.

ע"י שימוש במאפיין location של windows.

var querystring = window.location.search.substring(1);

אם כלומר אם הזנת את הכתובת הראשונה שלך שהסתיימה כך:

main.asp?theme=Fiapple/blue

אזי במשתנה querystring תהיה עכשיו המחרוזת theme=Fiapple/blue

תוכל לפצל את המחרוזת ע"י split ולמעשה לקבל מערך. מאחר שהמבנה של query string הוא כזה:

var1=data1&var2=data2&var3=data3

תוכל לבצע split ע"י הסימן "&" כדי לקבל את תת המחרוזות הבאות:

var1=data1
var2=data2
var3=data3

שגם על כל אחת (בלולאה) תוכל לבצע split לסימן "=" ולקבל מערך דו מימדי המכיל את שמות המשתנים ואת ערכיהם.

ברגע שבנית את המבנה החדש שרצית של query string, כל שנותר הוא לטעון את הדפדפן עם הכתובת החדשה:

document.location.href= the new query string

שוב אני מזכיר, בצד שרת זה יותר פשוט, כיש שם יש אובייקטים שנועדו לקלוט את המשתנים הללו...

בהצלחה,

פורסם
  • מחבר

ואם אני לא יודע כמה פעמים יש & אז אני משתמש בלולאה עד אשר אין יותר &?

ארכיון

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

דיונים חדשים

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.