Get value element same level?
I have a code:
<table>
<tr>
<td>
<input type="text" value="1" />
<input id="button" type="button" value="Click me!" />
</td>
</tr>
</table>
I want to get value of input[type="text"] by below code but It doesn't
work, please help me
<script type="text/javascript">
$(document).ready(function() {
$("#button").bind("click", function() {
alert($(this).siblings().find('input[type="hidden"]').val(););
});
});
</script>
No comments:
Post a Comment