手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >jquery 定位input元素的几种方法小结
jquery 定位input元素的几种方法小结
摘要:复制代码代码如下:需要定位到第三个文本框的时候:复制代码代码如下:$(“.edinput:text)”).eq(3)$(“.edinput:...

复制代码 代码如下:

<html>

<table class=”ed”>

<tr>

<td><input type="text"></input></td>

<td><input type="text"></input></td>

<td><input type="button"></input></td>

<td><input type="text"></input></td>

</tr>

</table>

</html>

需要定位到第三个文本框的时候:

复制代码 代码如下:

$(“.ed input:text)”).eq(3)

$(“.ed input:text:eq(3)”)

$(“.ed input[type=”text”]”).eq(3)

$(“.ed input[type=”text”]:eq(3)”)

其中.ed中ed是class="ed"。

【jquery 定位input元素的几种方法小结】相关文章:

javascript常用方法总结

jQuery获得字体颜色16位码的方法

jQuery实现页面内锚点平滑跳转特效的方法总结

jQuery实现html表格动态添加新行的方法

js去字符串前后空格的实现方法

JS/Jquery判断对象为空的方法

jQuery判断一个元素是否可见的方法

JS对字符串编码的几种方式使用

jQuery实现给页面换肤的方法

javascript去除空格方法小结

精品推荐
分类导航