zoukankan      html  css  js  c++  java
  • firstChild.nodeValue

    var ia=document.getElementsByTagName("em");var t=600; for(var ii=0;ii<t;ii++){var it=ia[ii]; try{var itnv=it.firstChild.nodeValue;if(itnv=="+"){console.log(ii);console.log(itnv);}}catch(err){};};

    var ia=document.getElementsByTagName("a");function mcg(i){console.log(i);};len=ia.length;for(var i=0;i<len;i++){var it=ia[i];try{itnv=it.firstChild.nodeValue;mcg(itnv);if(itnv.indexOf("mycom")>0){mcg("--ok-----------------------")}}catch(err){}};

    var ia=document.getElementsByTagName("a");function mcg(i){console.log(i);};len=ia.length;for(var i=0;i<len;i++){var it=ia[i];try{itnv=it.firstChild.nodeValue;mcg(itnv);if(itnv.indexOf("qingdao")>0 || itnv.indexOf("weibo")>0 || itnv.indexOf("下一页")>0){mcg("--ok--------------------------------------------------------");mcg(it.href);try{setTimeout(window.open(it.href),Math.ceil(Math.random()*600));}catch(err_open){}; if(itnv.indexOf("下一页")>0){it.click();}; };  }catch(err){}};

    function mcg(i){console.log(i);};for(var p=0;p<20;p++){var ia=document.getElementsByTagName("a");len=ia.length;for(var i=0;i<len;i++){var it=ia[i];try{var itnv=it.firstChild.nodeValue;if(itnv.indexOf("qdlzw")>0 || itnv.indexOf("qdstc")>0 ){mcg(it.href);try{setTimeout(window.open(it.href),Math.ceil(Math.random()*600));}catch(err_open){};}; if(itnv.indexOf("一页")>0){try{setTimeout(function(){it.click();},60000);;;}catch(err_open){}; ;};  }catch(err){}};setTimeout(mcg(p),Math.ceil(Math.random()*600000));};

    function sleep(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } };function clg(i){console.log(i);};ia=document.getElementsByTagName("a");len=ia.length;for(i=0;i<len;i++){ii=ia[i];;try{ittxt=ii.text;iihf=ii.href;if(ittxt.indexOf("关注")>=0 && ittxt.indexOf("已")<0 &&  iihf.length==0){clg(ii);clg(i);sleep(Math.ceil(Math.random()*1000*0.03));ii.click();};}catch(err){};};

  • 相关阅读:
    第七次上机练习
    第六次作业
    第六次上机练习
    第五次作业
    第五次上机练习
    第四次作业
    第四次上机练习
    第三次上机练习
    第三次作业
    第十一周上机练习
  • 原文地址:https://www.cnblogs.com/rsapaper/p/8320122.html
Copyright © 2011-2022 走看看