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.

String übergabe

Empfohlene Antworten

Veröffentlicht

hoi

habe eine JavaScript funktion der ich eine String übergeben will

habe damit ziemlich große Probleme, Zahlenwerte kann ich übergeben!

wie muss der Funktionskopf ausshen (Parameterangabe)

und wie erfolgt die Übergabe beim Aufruf???

bitte helft mir weiter

danke

didii

string is doch nix anderes als ein zahlenwert...:confused:

hier mal ein kurzes beispiel. bei click auf den submit wird der eingegebene text im textfeld an die fuction doit(stringWert) übergeben und dann als alert mit einem anderen string zusammengbastelt ausgegeben.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Untitled</title>

<script language="javascript">

function doit(stringWert)

{

alert (stringWert + ' (das war der übergebene String)');

}

</script>

</head>

<body>

<form>

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

<input type="submit" name="img" onClick="doit(test.value)">

</form>

</body>

</html>

oder hab ich da was falsch verstanden?

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.