当我在 IE8 中分解这段代码时
<script type="text/javascript" charset="utf-8" src="http://static.polldaddy.com/p/5968383.js"></script>
<noscript><a href="http://polldaddy.com/poll/5968383/">This is a test question ?</a></noscript>
并作为本地文件运行我收到此错误:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
Timestamp: Mon, 2 Jul 2012 09:30:39 UTC
Message: '_container' is null or not an object
Line: 63
Char: 6669
Code: 0
URI: http://static.polldaddy.com/p/6343643.js
当我将此页面放到服务器上,或使用 chrome 或 firefox 在本地运行时,它似乎工作正常,当我尝试在本地运行时,它可能是防火墙阻止了某些东西吗?
这是正在导入的 6343643.js,由于问题字符限制,我截断了一些代码:
var pollClosed5968383 = false;
var PDV_POLLRAND5968383 = false;
var PDV_a5968383 = '';
var PDV_o5968383 = '';
var PDV_id5968383 = 5968383;
var PDV_pt5968383 = 0;
var PDV_po5968383 = 0;
var PDV_b5968383 = 1;
var PDV_pr5968383 = 1;
var PDV_l5968383 = 0;
var PDV_s5968383 = 105;
var PDV_h5968383 = '0ec8b1077c28c833ab3714cef04b0f31';
var PDV_w5968383 = 5968383;
var PDV_share5968383 = 0;
var PDV_expire5968383 = 7257600;
var PDV_version5968383 = 0;
var PDV_def5968383 = '#PDI_container5968383 .pds-box{font-family: Helvetica, Arial, sans-serif;background: #fff;border: 1px solid #ccc;width: 300px;font-size: 12px;text-align: left;color: #4e4e4e;-webkit-border-radius: 12px;-moz-border-radius: 12px;border-radius: 12px;} #PDI_container5968383 .pds-box A{outline: none;} #PDI_container5968383 .pds-clear{display: block;clear: both;} #PDI_container5968383 .pds-box-outer{padding: 12px;} #PDI_container5968383 .pds-question-top{font-size:14px;line-height: 120%;color: #333;font-weight: bold;padding: 5px 0px 15px 0px;position:relative;} #PDI_container5968383 .pds-answer{padding: 10px 0px 10px 0px;border-top: 1px solid #e8e8e8;border-bottom: 1px solid #e8e8e8;} #PDI_container5968383 .pds-answer label{color: #333;font-size: 13px;line-height: 150%;position: relative;} #PDI_container5968383 .pds-answer-group{display: block;padding: 8px 0px 8px 0px;} #PDI_container5968383 .pds-answer-group BR{display: none;} #PDI_container5968383 .pds-answer-input{display: block;float:left;width: 25px;} #PDI_container5968383 .pds-input-label{display: block;float:left;width: 245px;cursor: pointer;} #PDI_container5968383 .pds-answer-other{padding: 0px 0px 0px 10px;} #PDI_container5968383 .pds-textfield{background: #FFF;border: 1px solid #d1d1d1;font-size: 12px;padding: 2px;width: 150px;} #PDI_container5968383 .pds-answer-other BR{display: none;} #PDI_container5968383 .pds-other-label{display: block;float:left;cursor: pointer;} #PDI_container5968383 .pds-feedback-group{display: block;padding: 8px 0px 8px 0px;} #PDI_container5968383 .pds-feedback-label{display: block;padding: 0px 0px 5px 0px;} #PDI_container5968383 .pds-feedback-result {float:right;} #PDI_container5968383 .pds-answer-text {float:left} #PDI_container5968383 .pds-feedback-per{font-weight: bold;} #PDI_container5968383 .pds-feedback-votes{font-weight: normal;} #PDI_container5968383 .pds-answer-feedback {background-color: #f1f1f1;border: 1px solid #d1d1d1;position: relative;} #PDI_container5968383 .pds-answer-feedback-bar {font-size: 2px;background: #3478e3;height: 18px;} #PDI_container5968383 .pds-vote {padding: 10px 0px;} #PDI_container5968383 .pds-votebutton-outer {} #PDI_container5968383 .pds-vote BR{display: none;} #PDI_container5968383 .pds-vote-button {color: #464646;padding: 3px 25px;white-space: nowrap;background:#F2F2F2 url(http://s3.wordpress.com/wp-admin/images/white-grad.png) repeat-x scroll left top;-webkit-border-radius: 11px;-moz-border-radius:11px;border-radius: 11px;border: 1px solid #999;cursor: pointer;font-size: 12px;font-family: \"Lucida Grande\",Verdana,Arial;text-decoration: none;line-height: 25px;font-weight: bold;white-space: nowrap;} #PDI_container5968383 .pds-vote-button:hover{border: 1px solid #333;} #PDI_container5968383 .pds-vote-button-load {color: #464646;padding: 3px 25px;white-space: nowrap;-webkit-border-radius: 11px;-moz-border-radius:11px;border-radius: 11px;border: 1px solid #999;cursor: pointer;font-size: 12px;font-family: \"Lucida Grande\",Verdana,Arial;text-decoration: none;line-height: 25px;font-weight: bold;white-space: nowrap;background:#EEE url(http://i.polldaddy.com/polls/vote-loader-eeeeee.gif) no-repeat scroll 50% 50%;} #PDI_container5968383 .pds-vote-button-load SPAN{visibility: hidden;} #PDI_container5968383 .pds-links {padding: 10px 0px 0px 0px;display: block;text-align: center;} #PDI_container5968383 .pds-links-back {padding: 10px 0px 0px 0px;display: block;text-align: center;} #PDI_container5968383 .pds-links A {font-family: Helvetica, Arial, sans-serif;font-size:12px;color: #4e4e4e;text-decoration: none;padding: 0px 4px 0px 4px;line-height: 24px;display: inline-block;font-weight: bold;} #PDI_container5968383 .pds-links-back A {font-family: Helvetica, Arial, sans-serif;font-size:12px;color: #4e4e4e;text-decoration: none;padding: 0px 4px 0px 4px;line-height: 24px;display: inline-block;font-weight: bold;} #PDI_container5968383 .pds-links A:hover {text-decoration: underline;} #PDI_container5968383 .pds-links-back A:hover {text-decoration: underline;} #PDI_container5968383 .pds-comments SPAN{font-weight: normal;} #PDI_container5968383 .pds-total-votes{padding: 10px 0px 0px 0px;position: relative;} #PDI_container5968383 .pds-total-votes SPAN{font-weight: bold;} #PDI_container5968383 div {margin:0;padding:0;}';
var PDV_sl5968383 = 1;
var PDV_lnk5968383 = 1;
var PDV_va5968383 = 0;
var PDV_POLL_q5968383 = 'This is a test question ?';
var PDV_POLL_medType5968383 = '0';
var PDV_POLL_medID5968383 = '';
var PDV_A5968383 = new Array();
PDV_A5968383[0] = new Array(4);
PDV_A5968383[0][0] = '26949777';
PDV_A5968383[0][1] = 'test answer a';
PDV_A5968383[0][2] = '0';
PDV_A5968383[0][3] = '';
PDV_A5968383[1] = new Array(4);
PDV_A5968383[1][0] = '26949778';
PDV_A5968383[1][1] = 'test answer b';
PDV_A5968383[1][2] = '0';
PDV_A5968383[1][3] = '';
PDV_A5968383[2] = new Array(4);
PDV_A5968383[2][0] = '26949779';
PDV_A5968383[2][1] = 'test answer c';
PDV_A5968383[2][2] = '0';
PDV_A5968383[2][3] = '';
PDV_A5968383[3] = new Array(4);
PDV_A5968383[3][0] = '26949780';
PDV_A5968383[3][1] = 'test answer d';
PDV_A5968383[3][2] = '0';
PDV_A5968383[3][3] = '';
PDV_A5968383[4] = new Array(4);
PDV_A5968383[4][0] = '26949781';
PDV_A5968383[4][1] = 'test answer e';
PDV_A5968383[4][2] = '0';
PDV_A5968383[4][3] = '';
var PDV_l1_5968383 = 'View Results';
var PDV_l2_5968383 = 'Other:';
var PDV_l3_5968383 = 'Vote';
var PDV_l4_5968383 = 'Please choose an answer first!';
var PDV_l12_5968383 = 'Share This';
var _debug = false;
var _document_root=(is_secure()?"https://polldaddy.com/swf/":"http://i0.poll.fm/swf/");var sc,_container,_global_pc,_global_ss,_global_wn;var FlashDetect=new function(){var n=this;n.installed=false;n.raw="";n.major=-1;n.minor=-1;n.revision=-1;n.revisionStr="";var m=[{name:"ShockwaveFlash.ShockwaveFlash.7",version:function(a){return k(a)}},{name:"ShockwaveFlash.ShockwaveFlash.6",version:function(b){var a="6,0,21";try{b.AllowScriptAccess="always";a=k(b)}catch(c){}return a}},{name:"ShockwaveFlash.ShockwaveFlash",version:function(a){return k(a)}}];var k=function(b){var a=-1;try{a=b.GetVariable("$version")}catch(c){}return a};var o=function(a){var b=-1;try{b=new ActiveXObject(a)}catch(c){b={activeXError:true}}return b};var l=function(a){var b=a.split(",");return{raw:a,major:parseInt(b[0].split(" ")[1],10),minor:parseInt(b[1],10),revision:parseInt(b[2],10),revisionStr:b[2]}};var h=function(c){var a=c.split(/ +/);var d=a[2].split(/\./);var b=a[3];return{raw:c,major:parseInt(d[0],10),minor:parseInt(d[1],10),revisionStr:b,revision:j(b)}};var j=function(a){return parseInt(a.replace(/[a-zA-Z]/g,""),10)||n.revision};n.majorAtLeast=function(a){return n.major>=a};n.minorAtLeast=function(a){return n.minor>=a};n.revisionAtLeast=function(a){return n.revision>=a};n.versionAtLeast=function(c){var b=[n.major,n.minor,n.revision];var a=Math.min(b.length,arguments.length);for(i=0;i<a;i++){if(b[i]>=arguments[i]){if(i+1<a&&b[i]==arguments[i]){continue}else{return true}}else{return false}}};n.FlashDetect=function(){if(navigator.plugins&&navigator.plugins.length>0){var e="application/x-shockwave-flash";var f=navigator.mimeTypes;if(f&&f[e]&&f[e].enabledPlugin&&f[e].enabledPlugin.description){var b=f[e].enabledPlugin.description;var d=h(b);n.raw=d.raw;n.major=d.major;n.minor=d.minor;n.revisionStr=d.revisionStr;n.revision=d.revision;n.installed=true}}else{if(navigator.appVersion.indexOf("Mac")==-1&&window.execScript){var b=-1;for(var a=0;a<m.length&&b==-1;a++){var c=o(m[a].name);if(!c.activeXError){n.installed=true;b=m[a].version(c);if(b!=-1){var d=l(b);n.raw=d.raw;n.major=d.major;n.minor=d.minor;n.revision=d.revision;n.revisionStr=d.revisionStr}}}}}}()};FlashDetect.JS_RELEASE="1.0.4";var pdcookie=(function(){this._class=function(){var self=this;this._pc={};this.get=function(name,cb){return self._pdcookie(name,undefined,cb)};this.set=function(name,value){return self._pdcookie(name,value)};this._pdcookie=function(name,value,cb){if(typeof self._pdcookie=="undefined"){self=this}self._pc.userData=self.pdcookie_userdata(name,value);self._pc.cookieData=self.pdcookie_cookie(name,value);self._pc.localData=self.pdcookie_local_storage(name,value);self._pc.globalData=self.pdcookie_global_storage(name,value);self._pc.sessionData=self.pdcookie_session_storage(name,value);if(window==window.top){self._pc.windowData=self.pdcookie_window(name,value)}tmpec=self._pc;self._pc={};var candidates=new Array();var bestnum=0;var candidate;for(var item in tmpec){if(typeof tmpec[item]!=="undefined"&&typeof tmpec[item]!=="null"&&tmpec[item]!="null"&&tmpec[item]!="undefined"){candidates[tmpec[item]]=typeof candidates[tmpec[item]]=="undefined"?1:candidates[tmpec[item]]+1}}for(var item in candidates){if(candidates[item]>bestnum){bestnum=candidates[item];candidate=item}}if(typeof cb=="function"){cb(candidate,tmpec)}return candidate};this.pdcookie_window=function(name,value){try{var wn=window.name;if(typeof value!=="undefined"){if(wn.indexOf("&"+name+"=")>-1||wn.indexOf(name+"=")==0){var idx=wn.indexOf("&"+name+"=");if(idx==-1){idx=wn.indexOf(name+"=")}var end=wn.indexOf("&",idx+1);var newstr;if(end!=-1){newstr=wn.substr(0,idx)+wn.substr(end+(idx?0:1))+"&"+name+"="+value}else{newstr=wn.substr(0,idx)+"&"+name+"="+value}window.name=newstr}else{window.name+="&"+name+"="+value}}else{return this.getFromStr(name,wn)}}catch(e){}};this.pdcookie_userdata=function(name,value){try{var elm=this.createElem("div","userdata_el",1);if(elm&&elm.load){elm.style.behavior="url(#default#userData)";if(typeof value!=="undefined"){elm.setAttribute(name,value);elm.save(name)}else{elm.load(name);return elm.getAttribute(name)}}}catch(e){}};this.pdcookie_local_storage=function(name,value){try{if(window.localStorage){if(typeof value!=="undefined"){localStorage.setItem(name,value)}else{return localStorage.getItem(name)}}}catch(e){}};this.pdcookie_session_storage=function(name,value){try{if(window.sessionStorage){if(typeof value!=="undefined"){sessionStorage.setItem(name,value)}else{return sessionStorage.getItem(name)}}}catch(e){}};this.pdcookie_global_storage=function(name,value){if(window.globalStorage){var host=this.getHost();try{if(typeof value!=="undefined"){eval("globalStorage[host]."+name+" = value")}else{return eval("globalStorage[host]."+name)}}catch(e){}}};this.pdcookie_cookie=function(name,value,expire){var cookie=this.getFromStr(name,document.cookie);if((typeof cookie=="undefined"||cookie==null)&&typeof value!=="undefined"){var today=new Date();today.setTime(today.getTime());if(typeof expire==undefined||expire==null){expire=(60*60*24*365*20*1000)}var expires_date=new Date((today.getTime()+expire));document.cookie=name+"="+value+"; expires="+expires_date.toGMTString()+"; path=/"}else{return cookie}};this.createElem=function(type,name,append){var el;if(typeof name!=="undefined"&&document.getElementById(name)){el=document.getElementById(name)}else{el=document.createElement(type)}el.style.visibility="hidden";el.style.position="absolute";if(name){el.setAttribute("id",name)}if(append){if(_container){_container.appendChild(el)}else{document.body.appendChild(el)}}return el};this.getFromStr=function(name,text){if(typeof text!=="string"){return}var nameEQ=name+"=";var ca=text.split(/[;&]/);for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)}}};this.getHost=function(){var domain=document.location.host;if(domain.indexOf("www.")==0){domain=domain.replace("www.","")}return domain}};return _class})();var swfstore=(function(){var f=0;var d=/[^a-z0-9_]/ig;function e(a){if(typeof a=="function"){throw"SwfStore Error: Functions cannot be used as keys or values."}}SwfStore=function(u){this.config=u||{namespace:"swfstore",swf_url:_document_root+"storage.swf",onready:function(){},onerror:function(){},debug:_debug,timeout:10};var s=this.namespace=this.config.namespace.replace(d,"_"),b=this.config.debug,p=this.config.timeout;function a(){return"SwfStore_"+s+"_"+(f++)}function c(g){var j=a();h=document.getElementById(j);if(typeof h=="undefined"||h==null){var h=document.createElement("div");if(typeof _container!=="undefined"||_container!==null){_container.appendChild(h)}else{document.body.appendChild(h)}h.id=j;h.style.position="absolute";h.style.top="0px";h.style.left="-2000px"}return h}if(b){if(typeof console=="undefined"){var r=c();window.console={log:function(g){var h=c();h.innerHTML=g;r.appendChild(h)}}}this.log=function(j,h,g){h=(h=="swfStore")?"swf":h;console.log("SwfStore - "+s+": "+j+" ("+h+"): "+g)}}else{this.log=function(){}}this.log("info","js","Initializing...");SwfStore[s]=this;var o=c(b);var q=a();var t="logfn=SwfStore."+s+".log&onload=SwfStore."+s+".onload&onerror=SwfStore."+s+".onerror";o.innerHTML='<object height="1" width="1" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+q+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param value="'+this.config.swf_url+'" name="movie"> <param value="'+t+'" name="FlashVars"> <param value="always" name="allowScriptAccess"> <embed height="1" align="middle" width="1" pluginspage="https://www.macromedia.com/go/getflashplayer" flashvars="'+t+'" type="application/x-shockwave-flash" allowscriptaccess="always" quality="high" loop="false" play="true" name="'+q+'" bgcolor="#ffffff" src="'+this.config.swf_url+'"></object>';this.swf=document[q]||window[q];this._timeout=setTimeout(function(){if(typeof SwfStore!=="undefined"&&typeof SwfStore[s]!=="undefined"){SwfStore[s].log("Timeout reached, assuming the store.swf failed to load and firing the onerror callback.");if(typeof SwfStore[s].config.onerror!=="undefined"){SwfStore[s].config.onerror()}}},p*1000)};SwfStore.prototype={ready:false,namespace:"SwfStore_prototype",set:function(b,a){if(this.namespace===SwfStore.prototype.namespace){throw"Create a new SwfStore to set data"}if(this.ready){e(b);e(a);this.swf.set(b,a)}else{throw"Attempted to save to uninitialized SwfStore."}},get:function(a){if(this.namespace===SwfStore.prototype.namespace){throw"Create a new SwfStore to set data"}if(this.ready){e(a);return this.swf.get(a)}else{throw"Attempted to read from an uninitialized SwfStore."}},getAll:function(a){if(this.namespace===SwfStore.prototype.namespace){throw"Create a new SwfStore to set data"}if(this.ready){e(a);return this.swf.get(a)}else{throw"Attempted to read from an uninitialized SwfStore."}},onload:function(){clearTimeout(this._timeout);this.ready=true;if(this.config.onready){this.config.onready()}},onerror:function(){clearTimeout(this._timeout);if(this.config.onerror){this.config.onerror()}}};return SwfStore}());var supercookie=(function(){this._class=function(){if(_$("PD_superContainer")==null){document.write('<div id="PD_superContainer"></div>')}_container=_$("PD_superContainer");if(typeof pdcookie!=="undefined"){_global_pc=new pdcookie()}PDF_log5968383("Flash version:: "+FlashDetect.raw);if(FlashDetect.versionAtLeast(9,0,31)&&typeof swfstore!=="undefined"&&window==window.top){_global_ss=new swfstore()}this.showCookies=function(d,e){for(var f in e){PDF_log5968383("Storage mechanism "+f+" returned: "+e[f])}};this.isEnabled=function(){var d="pd-test-cookie";var c;_global_pc.pdcookie_cookie(d,"true",(1000*5));c=_global_pc.getFromStr(d,document.cookie);PDF_log5968383("Cookies are enabled: "+c);return c=="true"};this.set=function(c,f){_global_pc.set(c,f);if(_global_ss&&_global_ss.ready){try{_global_ss.set(c,f)}catch(d){}}};this.get=function(l){var h,m,j;if(_debug){_global_pc.get(l,this.showCookies)}h=_global_pc.get(l);PDF_log5968383("Super Get- cookie_value::"+h);if(_global_ss&&_global_ss.ready){try{m=_global_ss.get(l)}catch(f){m=null}}PDF_log5968383("Super Get- lso_value::"+m);var k={d:h,a:m,c:j},p=pd=0;for(var o in k){var n=k[o];if(typeof n=="undefined"||n==null){if(o!="a"){pd=1}}else{p=parseInt(n)}}if(p>0&&pd>0){this.set(l,p)}return p}};return this._class})();
var PDV_audio_5968383 = 0;
//v3.24 25/Jun/12
var protocol=document.location.protocol=="https:"?"https:":"http:";var a2a_track_pub="polldaddy";var a2a_no_3p=1;var PD_ck5968383=0;var PD_ck_name5968383="PD_poll_"+PDV_id5968383;var PDV_n5968383="";var PD_button5968383;var PDV_nurl5968383=protocol+"//polldaddy.com/n/"+(typeof PDV_h5968383!=="undefined"?PDV_h5968383:PDV_id5968383)+"/"+PDV_id5968383+(PDV_w5968383!=PDV_id5968383?"/"+PDV_w5968383:"");function _$(b){return document.getElementById(b)}function is_secure(){return"https:"==document.location.protocol?true:false}function getHead(){return document.getElementsByTagName("head").item(0)}if(pollClosed5968383==false){var PDV_server5968383=protocol+"//polls.polldaddy.com";var AA5968383=new Array();var PDV_html5968383='<div style="margin-bottom: 0px; margin-top: 0px;" name="PDI_form5968383" id="PDI_form5968383"><div class="pds-box"><div class="pds-box-outer"><div class="pds-box-inner"><div class="pds-box-top"><div class="pds-question"><div class="pds-question-outer"><div class="pds-question-inner"><div class="pds-question-top">'+PDV_POLL_medID5968383+" "+unescape_HTML_5968383(PDV_POLL_q5968383)+'</div></div></div></div><div class="pds-answer"><span id="pds-answer5968383"></span>';if(PDV_po5968383==1){PDV_html5968383+='<span class="pds-answer-group">';if(PDV_pt5968383==0){PDV_html5968383+='<span class="pds-answer-input"><input type="radio" name="PDI_answer5968383" id="PDI_answerOther5968383" value="other" class="pds-radiobutton"/></span>'}PDV_html5968383+='<label for="PDI_answerOther5968383" class="pds-other-label"><span class="pds-answer-span">'+PDV_l2_5968383+'</span></label><span class="pds-answer-other"><br/><input class="pds-textfield" type="text" maxlength="80" id="PDI_OtherText5968383" name="PDI_OtherText5968383" onclick="PDF_checkOther5968383();" onchange="PDF_checkOther5968383(true);" /></span>';PDV_html5968383+='<span class="pds-clear"></span>';PDV_html5968383+="</span>"}PDV_html5968383+='</div><div class="pds-vote"><div class="pds-votebutton-outer">';if(PDV_l3_5968383==""){PDV_l3_5968383="Vote"}if(PDV_s5968383<99||PDV_def5968383.indexOf("input.pds-votebutton")!=-1){if(PDV_l3_5968383=="Vote"||PDV_l3_5968383==""){PDV_html5968383+='<input id="pd-vote-button5968383" type="button" class="pds-votebutton" style="border:none;cursor: pointer;" src="'+(is_secure()?"https://polldaddy":"http://i.polldaddy")+'.com/polls/spacer.gif">'}else{PDV_html5968383+='<input id="pd-vote-button5968383" type="button" class="pds-votebutton-pack" value="'+PDV_l3_5968383+'" />'}}else{PDV_html5968383+='<a id="pd-vote-button5968383" class="pds-vote-button"><span>'+PDV_l3_5968383+"</span></a>"}PDV_html5968383+='<span class="pds-links">';if(PDV_pr5968383==2){PDV_html5968383+="<br/>"}else{PDV_html5968383+='<a href="javascript:PD_vote5968383(1);" class="pds-view-results">'+PDV_l1_5968383+"</a><br/>"}if(PDV_lnk5968383==1){PDV_html5968383+='<a href="'+protocol+'//polldaddy.com/signup-free/?ad=poll-front" target="_blank" class="pds-pd-link">Polldaddy.com</a>'}PDV_html5968383+='<span class="pds-clear"></span>';PDV_html5968383+='</span><span class="pds-clear"></span>';PDV_html5968383+="</div></div></div></div></div></div></div>";for(PDV_x=0;PDV_x<PDV_A5968383.length;PDV_x++){if(PDV_pt5968383==0){AA5968383[PDV_x]='<span