jQuery在表中查找元素 [英] Jquery finding elements in table

查看:127
本文介绍了jQuery在表中查找元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的桌子:

this is my table:

<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
                <tr>
                    <td align="right">
                        <a id="imgAddTC" href="javascript:__doPostBack('imgAddTC','')"><img border="0" src="images/icons/add_server.png" alt="Alternate Text" /></a>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div id="divAddTC">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        <input name="nothing" type="text" value="my Value" id="nothing" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
</table> 


能够在表格中找到DIV(divAddTC),但无法在表格中找到INPUT TYPE(无),尝试了$(nothing).html()和$(divAddTC).find(nothing)以及$ (divAddTC).find("table","tr","td").find(什么都没有,但都返回Undefined,请告诉我正确的方法是什么.


am able to find the DIV(divAddTC) in the table but not able to find the INPUT TYPE (nothing) inside the table, have tried $(nothing).html() and $(divAddTC).find(nothing) and also $(divAddTC).find(''table'',''tr'',''td'').find(nothing) but all return Undefined, please advice me whats the correct way around.

推荐答案

(nothing).html()和
(nothing).html() and


(divAddTC).find(nothing)以及
(divAddTC).find(nothing) and also


(divAddTC).find(``table'',``tr'',``td'').find(什么都没有,但都返回Undefined,请告诉我正确的方法是什么.
(divAddTC).find(''table'',''tr'',''td'').find(nothing) but all return Undefined, please advice me whats the correct way around.


这篇关于jQuery在表中查找元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆