Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

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.

Event auslösen

Empfohlene Antworten

Sorry, aber das ist ziemlich ungenau formuliert.

OnMouseOver bezeichnet ja bereits einen Event-Handler.

Wenn Du also eine Funktion abc hast, dann kannst Du die einfach so aufrufen:


... onmouseover="abc()" ...

Oder wo liegt das Problem ?

Evil

  • Autor

Ich möchte bei einem Funltionaufruf den Event und den Auslöser übergeben.

Bsp:

onClick="javascript:funktion(this,event)"

Ja nachdem um was für einen Event es sich handelt, wird davon die weitere Abarbeitung des Scripts abhängig gemacht.

Original geschrieben von E-T

Ich möchte bei einem Funltionaufruf den Event und den Auslöser übergeben.

Bsp:

onClick="javascript:funktion(this,event)"

Ja nachdem um was für einen Event es sich handelt, wird davon die weitere Abarbeitung des Scripts abhängig gemacht.

Kannst Du dann nicht eher für jedes Event eine eigene Funktion bauen? Gleichbleibende Routinen kann man ja dabei in weitere Funktionen auslagern...

Hi,

wie wärs wenn du die events direkt mit Übergibst ? onclick="javascript:funktion('onclick')" und dann in ner switch-Anweisung auswertest... Ausserdem gibt es noch ein CaptureEvents in JavaScript, vielleicht kann das ja helfen.

MfG

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.