84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
$("#iframe的ID").contents().find("#iframe中的广告ID").remove()本来利用这个代码去除引用iframe的广告,可每个页面的广告id一刷新就更新Cpg23241154qzkmv Cpg23241154ustep Cpg23241154gvhzk 怎么写能赋予这个ID是动态的。
It seems that its ID is quite regular, basically starting with "Cpg", then the processing is as follows
$("#iframe的ID").contents().find('[id^="Cpg"]').remove();
This kind of direct query for iframes excludes those in your own site and blocks all others, or you can determine whether the name of the iframe meets a certain rule and then block it
If you can find a pattern, write a regular rule
It starts with Cpg, the middle 8 characters are always numbers, and the last 5 characters are lowercase letters:
^Cpg\d{8}[a-z]{5}$
Start with Cpg23241154, the last 5 are numbers or letters:
^Cpg23241154\w{5}$
It seems that its ID is quite regular, basically starting with "Cpg", then the processing is as follows
This kind of direct query for iframes excludes those in your own site and blocks all others, or you can determine whether the name of the iframe meets a certain rule and then block it
If you can find a pattern, write a regular rule
It starts with Cpg, the middle 8 characters are always numbers, and the last 5 characters are lowercase letters:
Start with Cpg23241154, the last 5 are numbers or letters: