html - value javascript function and dom -
i have function 1 window , takes value , passes on dom script , writes output screen on <div>
or <p>
or <a>
, work well.
my point change dom element , put value on 1 text input. try call input id on function , write value innerhtml,but nor work well.
i not call function on input elements on other dom elements.
this code
var vect = []; function close(val) { var elem = document.getelementbyid("output"); elem.innerhtml = ""; vect.length = 0; (var in val.multiple) { var d = val.multiple[i]; if (c) { elem.innerhtml += c.print("%a, %y %b %d"); vect[vect.length] = c; } } val.hide(); return true; }
thanks
if want set value of input
element, need use value
, not innerhtml
. should :
elem.value += c.print("%a, %y %b %d");
Comments
Post a Comment