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.

Javascript Variablen in HTML übernehmen

Empfohlene Antworten

Hi!

Ich hab da so ein kleines Problem:

Ich müsste eine Variable innerhalb eines Javascripts setzten (genauer durch eben dieses Javascript setzten lassen) und den Wert der Variable ausserhalb des Scriptes in den HTML Quelltext einbinden. Ist das möglich? Wie?

Der ursprung meiner Frage ist folgender: Ich habe ein Formular auf meiner Seite, daß es anderen erlaubt mir eine email zu schicken (also per action=mailto:adress). Da möchte ich aber nicht meine Adresse im Klartext reinschreiben (wegen Spam). Deshalb wollte ich die Adresse von einem Javascript (weil mein Webhoster kein CGI unterstützt, sonst hätte ich die lösung aus der c´t genommen) zusammenbauen lassen. Aber leider hab ich keine Möglichkeit gefunden das Script mitsamt seiner Ausgabe so in das Formular einzubauen, daß es auch funktioniert hätte :-(

Also wenn irgendwer ne bessere Idee hat: Ich bin offen für alles :-)

Grüße Matthias

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.