标签:ar for sp on html bs size htm 字符串
/*获取body中的内容*/
//var content = document.getElementsByTagName("body")[0].innerHTML;
/*如果body中有很多iframe那么就要循环去找了*/
var contents = document.getElementsByTagName("iframe");
//var content = $(contents[0]).contents().find("body").html();
var size = contents.length;
var i = 0;
var value = 0;
var temp = "";
for(i;i<size;i++){
temp = $(contents[i]).contents().find("body").html();
value += temp.indexOf(‘widget-name="rating"‘,0);
}
标签:ar for sp on html bs size htm 字符串
原文地址:http://www.cnblogs.com/taojiujiu/p/4037387.html