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.

JS onMoueseMove

Empfohlene Antworten

Veröffentlicht

Hi :)

ich habe folgenden link:

<a href=kalender.php onMousemove=test()><img src=./images/cal/test1.jpg ></a>

ich möchte mit eine JS-Funktion das bild test1.jpg in test2.jpg umwandeln (onMoueseMove) bite helft mir wie das geht ;))

danke Jake

Erstmal:

Dazu nimmt man "OnMouseOver" und "OnMouseOut" um das alte Image wiederherzustellen.

Beispiel:

JavaScript Teil:


<script language="JavaScript">

<!--

function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}


function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}

//-->

</script>

HTML Teil:

<a href="test.htm" onMouseOut="MM_swapImgRestore()"

onMouseOver="MM_swapImage('programm','','images/test2.gif',1)">

<img name="programm" src="images/test1.gif"></a>

Test1.gif ist das sichtbare Bild, wenn man mit der Maus darüber fährt, wechselt das Bild auf Test2.gif.

Willst du das Test2.gif stehenbleibt, entferne einfach das onMouseOut.

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.