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.

Bei <script for="id event="onkeydown"> den Keycode erfragen

Empfohlene Antworten

Veröffentlicht

Ich habe ein Script geschrieben, dass bei onClick auf eine Tabellenzelle ausgelöst wird.

Nun muss ich programmieren, dass das Event auch ausgelöst wird, wenn man die Zelle per Tab auswählt und dann mit Leertaste darauf drückt ("Accessability").

Kann ich in so einem Script anfragen, welche Taste gedrückt wurde?


<SCRIPT FOR="tabstrip-itm-1" EVENT="onkeydown" LANGUAGE="JavaScript">

von welcher Programmiersprache reden wir?

LANGUAGE="JavaScript

ignorier mich bitte, war, ne harte Woche ... sorry


<SCRIPT FOR="tabstrip-itm-1" EVENT="onkeydown" LANGUAGE="JavaScript">

sowas kann AFAIK nur der IE verbrechen....

wenn auf deinem Text ein Link liegt, kannst du diesen per tab auch erreichen. Die reihenfolge der tabsprünge kannst du mit tabindex beeinflussen

also du kannst auf einem Element das onkydown verwenden, ob das auch mit Tabellenzellen geht, weiss ich nicht.

Prinzipiell:

<td onkeyup="checkField(event)">...

in deinem Javascript

<script language="JavaScript">

function checkField(objEvent)

{

nKeyCode = getKeyCode(objEvent);

}

function getKeyCode(objEvent) {

if (objEvent.srcElement) { //--- IE

return objEvent.keyCode

}

if (objEvent.target) { //--- NC

return objEvent.which

}

}

</script>

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.