Need jQuery selector for hidden form element -
this part of html form:
<form name = 'myform'> <input type='button' name='mybutton' value='activate'> <input type='hidden' name='myhidden' value='elementvalue'>
i want send value of hidden element server when user clicks 'activate' button using ajax. here a snippet works, need change part:
$("input[name=choice1]").val(this.value);
in order select hidden element value , don't know how.
at moment i'm learning python, flask/jinja2 , html/css @ same time, diving jquery right now.
thank efforts.
$("input[name=myhidden]").val(this.value);
just modify selector. see docs http://api.jquery.com/category/selectors/
Comments
Post a Comment