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 Wert zuweisen

Empfohlene Antworten

Veröffentlicht

Hallo ich habe ein Problem. Und zwar habe ich folgende Funktion:

function changeRadio(){

document.forms[0].bemerkungen.value="Stornieren";

}

und im Formular dazu steht dann beim entsprechenden Auswahlfeld

<input name=action type=radio class=normal_1 id=action value=7 onSelect=javascript:changeRadio()>

Auftrag <strong>STORNIEREN!</strong></p>

Allerdings macht er die Funktion nicht.

Sorry ihr zwei, man sollte gucken, was man abschickt :)

Also, ich habe im Head-Bereich die angesprochene Funktion. Dann gibt es ein Textfeld mit dem Namen Bemerkungen in einem Formular der HTML-Datei.

Es gibt auch noch nen Radiobutton Stornieren in dem Formular. Nun möchte ich, dass dann wenn ein Benutzer den Radiobutton anklickt, im Textfeld der Text stornieren erscheint.

Das soll passieren. Mal so erklärt, vielleicht hilft das.


<script>

function changeRadio(){

document.forms[0].bemerkungen.value="Stornieren";

} 

</script>


<form>

<input type="text" name="bemerkungen">


<input name=action type=radio class=normal_1 id=action value=7 [B]onClick[/B]=javascript:changeRadio()> 

Auftrag <strong>STORNIEREN!</strong></p></form>

onclick statt onselect ist richtig und funktioniert.

s'Amstel

Ich würde anstatt dem onClick den onChange handler verwenden.

Gruß,

Markus

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.