javascript - GetValue Nested Input JS -
i have html:
<div class="alaves"> <h4>admin</h4> <input type="hidden" value=1> </div> //...there have 10 class="alaves" inputs
and need if clicked show value; not working.
and js:
$(document).ready(function () { $('.alaves').click(function () { assert( this.getelementsbytagname('input').val); }); });
i'm guessing mean:
$(function (){ $('.alaves').click(function (){ $("input", this).each(function(){ assert(this.value); }); }); });
Comments
Post a Comment