现在我使用jQuery来选择某个元素。如何在没有特殊子元素的jQuery中获取元素
CODE:
<form class="form-horizontal" action="">
<div class="form-group">
<input type="text" name="key_word" class="form-control" value="">
<button type="submit" class="btn btn-primary btn-bg-red">
GO
</button>
</div>
</form>
而且我还有其他的形式:
<form class="form-horizontal" action="">
<div class="form-group">
<input type="text" name="key_word" class="form-control" value="">
<input type="text" name="test" class="form-control" value="">
<button type="submit" class="btn btn-primary btn-bg-red">
GO
</button>
</div>
</form>
如何做到的jQuery选择第一种形式?即如何获得没有特殊孩子的元素?
'$('form.form - 水平')。当量(0)'? – roullie
是什么让孩子“特别”? –
我猜你的意思是“没有孩子测试元素”? –