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.

Layer per ID steuern

Empfohlene Antworten

Veröffentlicht

Hallo Leute hat jemand von euch ne ahnung wie das funzen könnte?

var layer_id;

function moveout ()

{

layer_id.style.left=-500;

}

function test ()

{

layer_id = 2;

moveout ();

}

layer_id ist ne var die die zuordnung der layer im dokument steuern soll. das problem, javascript erkennt layer_id als name für einen layer und nicht als variable. habt jemand ne ahnung wie ich das kurbeln kann damit er es als zuornungsbare variable erkennt. wichtig ist das die variable bei der eingabe eine zahl ist. kann sie ja später in sting wandeln wenn nötig.

danke für die infos.

mario

var NN4 = document.layers? true : false; //Netscape Navigator 4.x.

var IE4 = document.all? true : false; // IE version 4 and above.

var NN6 = document.getElementById&&!document.all? true : false //Netscape Navigator 6.x.

function moveout (layerName)

{

if (NN6){document.getElementById(layerName).style.left = "-500";

}

else if (IE4) {document.all[layerName].style.left = "-500";

}

else if(NN4) {document.layers[layerName].style.left="-500"; }

}

</HEAD>

<BODY>

<SCRIPT>

moveout ('1');

</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.