Jump to content

Instantanious Form Field Multiplication


EnriqueI

Recommended Posts

<script>
function update(){
document.getElementById('answer').value = document.getElementById('f1').value * document.getElementById('f2').value;
}
</script>
<input id='f2' type='text' onchange='update()'><input id='f1' type='text' onchange='update()'><input id='answer' type='text'>

<script>
function update(){
document.getElementById('answer').value = document.getElementById('f1').value * document.getElementById('f2').value;
}
</script>
<input id='f2' type='text' onchange='update()'><input id='f1' type='text' onchange='update()'><input id='answer' type='text'>

 

Thanks. :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.