login  Naam:   Wachtwoord: 
Registreer je!
 Overzicht:
Overzicht > JavaScript > onKeyUp()

Gebruik:
onKeyUp()

Uitleg:
Wanneer iemand een toets lostlaat wordt deze gebeurtenis geactiveerd.


Voorbeeld:
onKeyUp(window.alert("Eindelijk, je hebt de toets losgelaten! -.-'"))

Bijdragen :
nemesiskoen
Dit is enorm handig bij livesearch (via AJAX) of als je bv. een maximum aantal tekens wil laten invoeren en dit dan ook weergeven:

  1. <script language="javascript">
  2. var aantal_tekens = 25;
  3.  
  4. function tel() {
  5. var waarde = document.form.aantal.value;
  6. document.form.teller.value = aantal_tekens - waarde.length;
  7. }
  8. </script>
  9.  
  10. <form name="form">
  11. Titel: <input type="text" name="aantal" onkeyup="tel(); return true;" maxlength="25" /><br />
  12. U mag nog <input type="text" name="teller" value="25" /> Tekens gebruiken
  13. </form>
leendert
  1. function test()
  2. {
  3. document.getElementById('veldid').value = document.getElementById('veldid').value.toLowerCase();
  4. }
  5.  
  6. <input type="text" name="iets" id="veldid" onkeyup="test();" />


Wanneer je iets in het veld invoert wordt dmv onkeyup de functie test aangeroepen die vervolgens de input wijzigd naar kleine letters.


 Overzicht
Array()
array.concat()
array.join()
array.length
array.pop()
array.push()
array.reverse()
array.unshift()
charAt()
concat()
document.anchors()
document.captureE...
document.clear()
document.close()
document.contextu...
document.elementF...
document.lastModi...
document.links()
document.open()
document.releaseE...
document.routeEve...
document.title
document.URL
document.write()
document.writeIn()
escape()
eval()
getSelection()
history.back()
history.forward()
history.go()
history.length
indexOf()
length
Math.abs()
Math.acos()
Math.asin()
Math.atan()
Math.ceil()
Math.cos()
Math.E
Math.exp()
Math.floor()
Math.log()
Math.max()
Math.min()
Math.PI
Math.pow()
Math.random()
Math.round()
Math.sin()
Math.sqrt()
Math.tan()
navigator.appCode...
navigator.appName()
navigator.appVers...
navigator.cookieE...
navigator.javaEna...
navigator.platform()
navigator.taintEn...
onAbort()
onBlur()
onChange()
onClick()
onDblClick()
onError()
onFocus()
onKeyDown()
onKeyPress()
onKeyUp()
onLoad()
onMouseDown()
onMouseMove()
onMouseOut()
onMouseOver()
onMouseUp()
onMove()
onReset()
onResize()
onSelect()
onSubmit()
onUnload()
parseFloat()
parseInt()
print()
reload()
setTimeout()
string.big()
string.blink()
string.bold()
string.charCodeAt()
string.fixed()
string.fontcolor()
string.fontsize()
string.fromCharCo...
string.indexOf()
string.intalics()
string.length()
string.link()
string.match()
string.slice()
string.split()
substr()
toLowerCase()
toUpperCase()
unescape()
window.alert()
window.blur()
window.clearTimeo...
window.close()
window.confirm()
window.focus()
window.prompt()
window.screen()
window.setInterval()
window.setTimeout()



© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.037s