jquery - textarea maxlength dropdown menu -


i have dropdown menu 3 values , depending on value select in menu want textarea maxlength change. possible or can work?

i have looked @ jquery val() , change() not got work.

/best regards

you can use like

<input id="myinput" type="text" maxlength="2">  <select>   <option onclick='changemaxlength(2)'>2</option>   <option onclick='changemaxlength(5)'>5</option>   <option onclick='changemaxlength(10)'>10</option> </select> 

and jquery

function changemaxlength(length) {     jquery("#myinput").attr('maxlength', length);   } 

Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

How can do a tuple comparison in coffeescript similar to that in python? -

math - "ELO Rating" and how does "TSR Rating" work? -