javascript - Change value of input onchange? -


I need a very javascript function (which I can not get to work, not so simple for me).
When a person enters a number in the input field, then the value of another input field should be changed to that value. I have an ATM:

  function update input (ISH) {fieldname.value = ish; } & Lt; Input type = "text" name = "fieldname" id = "field name" /> & Lt; Input type = "text" name = "cheese" onchange = "updateInput (value)" />   

But it can not work in any way, can anyone help me?
Thanks in advance!

You can not access your domain name as a global variable Are there. Use: Function Update Input (IIS) {document.getElementById ("FieldName"). Value = ish; }

and

  onchange = "updateInput (this.value)"    

Comments