jQuery的$().text(),用法

来源:互联网 发布:算法导论 22.3 10 编辑:程序博客网 时间:2024/05/29 17:57

1代码如下:

<th type="other"  realhref="html/userinfo/userInfo_viewUser.html?ID=XXXX" click="viewUser(this);" title="状态">王强</th>

function viewUser(t) {
    var $t = $(t);
    var ttext=$t.text();//ttext的值,即为“王强”

}



0 0
原创粉丝点击