<div id="contentChildren" class="frame">
<div id="icon_com.tms.cms.article.Article_fc7be680-c0a8c88d-1be20c00-e3a2814e">
<a class="contentItem Article" href="http://localhost:9080/ekms/contentexplorer /explorer.jsp?cn=contentExplorer.panel&et=openMenu&contentId=com.tms.cms.article.Article_fda4d360-c0a8c88d-ae8af400-e4f04255">
</div>
</div>
我有上面的html。我试图使用jQuery来选择里面的div。这是“icon_com.tms.cms.article.Article_fc7be680-c0a8c88d-1be20c00-e3a2814e”的分辨率ID“jquery无法选择div
但它好像不能被选中。我尝试使用
$("icon_com.tms.cms.article.Article_fc7be680-c0a8c88d-1be20c00-e3a2814e").html();
但它返回null。这是我使用的功能
function _clickMenu(){
var parent = $(this).parent();
var name = $(this).attr("name");
var id = parent.attr("id");
id = id.substr(5);
$.getJSON(this.href, function(data){
});
var icon = "#icon_"+id;
var x = $("#icon_com.tms.cms.article.Article_fc7be680-c0a8c88d-1be20c00-e3a2814e");
alert("x : " + x.html());
return false;
}
任何人都可以帮我吗?
嗨,感谢这对我有用。 – 2012-01-17 08:10:58
然后标记答案为接受.. :) lollzzz – 2012-01-17 08:12:56