收集到的程式碼
;微信的js裡面的iframe程式碼
(function(){
var iframe = document.getElementsByTagName('iframe');
for ( var i=0,il=iframe.length;i var a = iframe[i]; #var src_ = a.getAttribute('src')| |a.getAttribute('data-src')||""; if(!/http(s)*\:\/\/v\.qq\.com\/iframe\/(預覽|播放器)\.html\?/.test(src_)){ 繼續; #mydiv.src="data:image/gif AAAABJRU5ErkJggg= = "; mydiv.setAttribute("data-vid",vid); mydiv.style.cssText = "width: " obj.w "px !important;height: " obj.h "px !important;"; a.style.display = "none"; insertAfter(mydiv,a); a.style.cssText = ";width: " obj.w "px !important;height: " obj.h "px !important;" ; a.setAttribute("width",obj.w); a.setAttribute("height",obj.h); #a.setAttribute(" data-vh",obj.vh); a.setAttribute("data-vw",obj.vw); a.setAttribute("data-src",location.protocol "//v.qq.com/iframe/player.html?vid=" vid "&width=" obj.vw "&height=" obj.vh "&auto=0"); #} })(); })(); 為什麼會自動吧這串js程式碼採集過來了,有視訊的時候就顯示出來沒有視訊的時候採集出來就是上面的程式碼求解釋