我需要你的帮助,根据jquery中div的css类名在div中找到textbox id.
<div class="FH_element FH_text required" id="FH_0_first_name">
<label for="FHE_0_first_name">First*<small></small></label>
<div>
<input type="text" title="" name="first_name" value="" tabindex="3" id="FHE_0_first_name">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
在上面的代码中,我需要在jquery中使用div的类名(必需)来查找文本框id(FHE_0_first_name).
使用非常具体的选择器:
var textboxId = $('div.FH_element.FH_text.required')
.find('input[type="text"]')[0]
.id;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
16235 次 |
| 最近记录: |