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.

Eingabefelder vorbelegen

Empfohlene Antworten

Hallo,

Gibt es auch die Möglichkeit ein Eingabefeld zunächst mit einem Text vorzubelegen,

der dann sobald man mit dem Cursor in dieses Feld kommt, gelöscht wird.

Hallo!

Wenn du's ganz schön mache willst, kannst du per Java-Script die vorausgefüllten Felder beim "Betreten" löschen. Den Wert kannst du manipulieren, indem du in das Objekt document.FORMULAR.FELD.value manipulierst.

Du darfst nicht vergessen, für jedes Feld eine Variable zu setzen, die sich merkt, ob der vorbelegte Wert bereits gelöscht wurde, sonst löscht der Benutzer seine Eingabe, wenn er zurückgeht um etwas zu ändern.

In das Input-Tag, das den Wert tragen soll, trägst du dann das Script mit onfocus ein.

Ein Beispiel, das die andere Variante zeigt, was du aber abändern kannst, findest du bei SelfHTML - Event onfocus. Dort wird etwas eingetragen, wenn du in das Feld klickst.

Ciao,

Florian

...und nochmal zum Abgucken: http://www.ntk.net/1997/11/14/ dort hat man alles wie du es machen wolltest.

Gruß,

Florian

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.