javascript - insert text into textarea when option selected -
i need help. i'm trying insert text textarea-element when url contains 'number' , option value='option2' of selectbox selected. var contenttoinsert = 'text'; if (location.href.indexof("/number")) { if (value of selectbox == 'option2') { $("textarea").append(contenttoinsert); } }
how check when option selected? text insert shouldn't shown when option selected. mean need on event-handler onchange.
have got idea?
jquery .change() event exists :
description: bind event handler "change" javascript event, or trigger event on element.
thy :
Comments
Post a Comment