/*将css放进来编译*/
var linkCss;
quizJs = ‘//s0.pstatp.com/resource/toutiao_web/static/quiz_static/quiz_7aa53b1.js’;
linkCss= ‘//s2.pstatp.com/resource/toutiao_web/static/quiz_static/quiz_523e8c9.css’;
/*加载css*/
var appendCss = function (href) {
if (href) {
var link = document.createElement(‘link’);
link.type = ‘text/css’;
link.rel = ‘stylesheet’;
link.href = href ;
document.body.appendChild(link);
}
};
(function(){
appendCss(linkCss);
/*在wap的页面里加入调整页面的代码*/
/*该套模版四个地方使用
1、后台头条号预览
2、客户端页面里面
3、wap页面
4、pc页面
在预览的地方需要一个全局变量抛出,也可以放在事件里,但本处本质上都是一个全局的变量,暂时放置这里
*/
window.loadQuiz = function (){
var answer = {“data”:[{“title”:”\u9009\u62e9A”,”range_to”:”0″,”image”:”http:\/\/p2.pstatp.com\/large\/9558\/4094046280″,”num”:1,”range_from”:”0″,”explicate”:”\u4f60\u5728\u522b\u4eba\u773c\u4e2d\u5f88\u5b8c\u7f8e\uff0c\u5374\u552f\u72ec\u9762\u4e34\u604b\u7231\u548c\u5f02\u6027\u7684\u95ee\u9898\u65f6\uff0c\u5374\u4e0d\u77e5\u9053\u8be5\u600e\u6837\u9762\u5bf9\u3002\u4f60\u5728\u604b\u7231\u65b9\u9762\u6216\u8bb8\u662f\u51fa\u4e8e\u8fc7\u53bb\u67d0\u6bb5\u523b\u9aa8\u94ed\u5fc3\u7684\u521b\u4f24\u6240\u81f4\uff0c\u6216\u8bb8\u88ab\u66fe\u7ecf\u5b8c\u5168\u4fe1\u8d56\u7684\u4eba\u51fa\u5356\uff0c\u5bfc\u81f4\u4e86\u73b0\u5728\u7684\u4f60\u5728\u7231\u60c5\u9762\u524d\uff0c\u62ac\u4e0d\u8d77\u5934\u3002″},{“title”:”\u9009\u62e9B”,”range_to”:”0″,”image”:”http:\/\/p1.pstatp.com\/large\/9555\/6431718818″,”num”:2,”range_from”:”0″,”explicate”:”\u4f60\u603b\u662f\u89c9\u5f97\u81ea\u5df1\u80fd\u529b\u4e0d\u5f3a\uff0c\u5c31\u7b97\u4f60\u73b0\u5728\u72b6\u51b5\u4e0d\u9519\uff0c\u4e5f\u4f1a\u8ba4\u4e3a\u53ea\u662f\u51ed\u8fd0\u6c14\u800c\u5df2\uff0c\u800c\u8fd0\u6c14\u662f\u65e0\u6cd5\u957f\u4e45\u7684\uff0c\u56e0\u6b64\u4f60\u5fc3\u91cc\u603b\u662f\u4e0d\u5b89\uff0c\u9762\u5bf9\u90a3\u4e9b\u6bd4\u4f60\u51fa\u8272\u7684\u4eba\u65f6\uff0c\u5c31\u4f1a\u4ea7\u751f\u4e00\u79cd\u201c\u6211\u6839\u672c\u6ca1\u6709\u529e\u6cd5\u4e0e\u4ed6\u6bd4\u62df\u2026\u2026\u201d\u7684\u60f3\u6cd5″},{“title”:”\u9009\u62e9C”,”range_to”:”0″,”image”:”http:\/\/p3.pstatp.com\/large\/9556\/4360703612″,”num”:3,”range_from”:”0″,”explicate”:”\u4f60\u7684\u4e2a\u6027\u6de1\u7136\uff0c\u4f60\u4e0d\u662f\u4e00\u4e2a\u4f1a\u5bf9\u751f\u6d3b\u62b1\u6709\u5f88\u5927\u5e7b\u60f3\u7684\u4eba\uff0c\u5bf9\u4e8e\u5f88\u591a\u4eba\u548c\u4e8b\u90fd\u89c9\u5f97\u65e0\u6240\u8c13\uff0c\u8fd9\u5c31\u4f7f\u5f97\u5f88\u96be\u6709\u4e8b\u60c5\u6216\u4eba\u5728\u4f60\u5fc3\u4e2d\u7559\u4e0b\u5f88\u6df1\u7684\u5f71\u54cd\u3002\u5185\u5fc3\u7684\u51b0\u51b7\u548c\u8352\u829c\uff0c\u4f7f\u5f97\u4f60\u5e38\u5e38\u89c9\u5f97\u4eba\u751f\u6ca1\u6709\u65b9\u5411\uff0c\u6beb\u65e0\u4ef7\u503c\u3002″},{“title”:”\u9009\u62e9D”,”range_to”:”0″,”image”:”http:\/\/p2.pstatp.com\/large\/9560\/831665247″,”num”:4,”range_from”:”0″,”explicate”:”\u4f60\u53ef\u80fd\u4ece\u5c0f\u5c31\u662f\u4e2a\u6587\u9759\u4e0d\u7231\u52a8\u7684\u5b69\u5b50\uff0c\u53c8\u6216\u8bb8\u4e00\u76f4\u5904\u5728\u4e00\u4e2a\u4eba\u7684\u72b6\u6001\u4e2d\u592a\u957f\u592a\u4e45\uff0c\u4ee5\u81f3\u4e8e\u5fd8\u8bb0\u4e86\u5982\u4f55\u4e0e\u4eba\u4ea4\u6d41\u3002\u4f60\u603b\u662f\u4e3a\u65e0\u6cd5\u4e0e\u4eba\u987a\u7545\u7684\u6c9f\u901a\u611f\u5230\u975e\u5e38\u7684\u7126\u6025\u548c\u81ea\u5351\uff0c\u7ecf\u5e38\u56e0\u4e3a\u7d27\u5f20\u800c\u4e0d\u77e5\u6240\u4e91\u3002″}],”answer_format”:{“p2″:””,”p1″:””}};
var requestType = “0”;
var script = document.createElement(‘script’);
script.src = quizJs;
/*加载完成后调用一下*/
script.onload = function(){
voteModule.init(answer,requestType);
};
/*兼容下ie7\ie6*/
script.onreadystatechange = function() {
if(script.readyState == “complete” || script.readyState == “loaded”){
voteModule.init(answer,requestType);
}
};
document.body.appendChild(script);
};
/*客户端的安卓只有首次响应window.onload事件,坑*/
window.onload = function(){
loadQuiz();
};
})();
-
A,红色
-
B,黄色
-
C,浅蓝
-
D,浅粉