Toon posts:

[js] input type=image -> plaatje swappen

Pagina: 1
Acties:

Verwijderd

Topicstarter
Hallow,

weet iemand hoe ik in javascript een plaatje van een submit kan swappen ? dus bij een <input type=image src="plaatje.gif" onMouseover="??" onMouseout="??"> ...

avb

  • Bosmonster
  • Registratie: Juni 2001
  • Laatst online: 29-08 19:47

Bosmonster

*zucht*

volgens mij kan dat neit, maar ik kan fout zitten :P

Gebruik zelf iig altijd gewoon een plaatje met onclick="form.submit()" zeg maar. Dan kun je je standaard mouseover scrippie gebruiken.

  • r0bert
  • Registratie: September 2001
  • Laatst online: 11-08 16:19
code:
1
<input type=image src="plaatje.gif" onMouseover="this.src = 'erg-1.jpg';" onMouseout="this.src = 'plaatje.gif';">

werkt gewoon

  • Bosmonster
  • Registratie: Juni 2001
  • Laatst online: 29-08 19:47

Bosmonster

*zucht*

kijk eens aan.. is wel IE-only gok ik...

  • r0bert
  • Registratie: September 2001
  • Laatst online: 11-08 16:19
Hmm.. Kwestie van testen..

// r0bert is niet zo goed op de hoogte van xBrowser gedoe :S

Verwijderd

Je kunt gewoon de standaard image swap functies gebruiken hoor..
Zoek een site die zoiets gebruikt (zijn er zat), heb je et meteen NS compatible..

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

r0bert:
code:
1
<input type=image src="plaatje.gif" onMouseover="this.src = 'erg-1.jpg';" onMouseout="this.src = 'plaatje.gif';">

werkt gewoon
preloaden? ;)

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz

Pagina: 1