javascript - Build an Input value based on other multiple input values -


I have a set of form fields that

  like  type < Text "name =" item "id =" item "value =" "& gt; & gt; input type =" text "name =" desc "id =" desc "value =" "& gt; & lt; input type Input type = "hidden" name = "some code" name = "some code" value = "1" & gt; "text" ; " "Value =" "& gt;   

The code that I need is to auto update to the result field because in other areas a double code - Added between them, the result will look like

  object - desc - place - somecode - op   

for this site i jquery If the other javascript is useful on the site then it is useful (but not required) if it is useful to get the desired result

It should be assumed that you can add a category to each item. Although I'm not sure if the hidden value changes it will be triggered, do you need it?

  $ ('input.test'). Change (function () {$ ('# val () ($ (' # item '). Val () + "-" + $ (' # desc '). Val () + "-" + $ (' # Val () + "-" + $ ('# some code'). Val () + "-" + $ ('# op'). Val ());});  < / Pre> 



Comments