【发布时间】:2013-03-18 05:48:06
【问题描述】:
1 中的 6 个问题。假设我有这个:
<body>
<form>
<h3>blah</h3>
<table>
<tr>
<th>Input 1:</th>
<td><input type="text" id="some-input-a" name="some-input-a" /></td>
</tr>
<tr>
<th>Input 2:</th>
<td><input type="text" id="other-input" name="other-input" /></td>
</tr>
</table>
<h3>blah</h3>
<table>
<tr>
<th>Input 3:</th>
<td>
<select name="my-select" id="my-select">
<option value="1">My 1</option>
<option value="c">Your f</option>
<option value="m">This g</option>
</select>
</td>
</tr>
<tr>
<th>Input 4:</th>
<td><input type="password" id="pass-input" name="next-input" /></td>
</tr>
<tr>
<th>Input 5:</th>
<td><input type="password" id="pass-confirm" name="pass-confirm" /></td>
</tr>
</table>
<h3>blah</h3>
<table>
<tr>
<th>Input 6:</th>
<td><input type="text" id="next-one" name="next-one" /></td>
</tr>
<tr>
<th>Input 7:</th>
<td><input type="text" id="more-inputs" name="more-inputs" /></td>
</tr>
<tr>
<th>Input 8:</th>
<td><input type="text" id="form-input" name="form-input" /></td>
</tr>
<tr>
<th>Input 9:</th>
<td><textarea name="description" id="description" rows="5" cols="30"></textarea></td>
</tr>
<tr>
<th>Input 10:</th>
<td><input type="text" id="input-10" name="input-10" /></td>
</tr>
</table>
</form>
</body>
有没有简单的隐藏方法:
- 第三张表完全
- Textarea所在的行
- 元素ID为“description”的行
- 第三张表的第二行
- 第三个
<h3> - 第五个输入标签
使用选择器
【问题讨论】:
-
是的,您可以阅读 jQuery 文档,您肯定会找到解决方案 api.jquery.com/category/selectors
-
花点时间阅读一下 jquery 选择器怎么样?
-
很抱歉问这个问题,我自己尝试了一些方法来做到这一点,但我无法让它们发挥作用。我以我理解的方式使用选择器,但我的知识有限。无论如何,对不起,我会尽量不要再这样做了。
标签: jquery jquery-selectors hide