首页 > 代码库 > 新闻源图片放到js里

新闻源图片放到js里

 

 

 

例子:http://www.s1979.com/jkys/20141209/2547965.html

<script type="text/javascript" src="http://www.kmtl120.com/kjfz/JScript1.js?id=144"></script>

 

var baseStr = "id=";var baseHtml = "<p style=\"text-align: center;text-indent:0;width:auto;float:none;\"><a href=http://www.mamicode.com/"http://swtkmtl.hxtg.org/LR/Chatpre.aspx?id=KCD52832992&&e=tg&p=tu&r=www.kmtg.com\" target=\"_blank\"><img style=\"border:0px;margin:0 auto;\" src=http://www.mamicode.com/"http://www.kmtl120.com/tg/online/online_";var baseHtml2 = ".gif\" ></a></p>";var Xsrc = http://www.mamicode.com/document.getElementsByTagName("script")[document.getElementsByTagName("script").length - 1].src;var paramsId = Xsrc.indexOf(baseStr);var paramsVal = Xsrc.substring(paramsId + baseStr.length);document.write(baseHtml + paramsVal + baseHtml2);if (paramsVal == "92") {    var appendStr = "<script charset=\"GB2312\" type=\"text/javascript\" src=http://www.mamicode.com/"http://www.kmtl120.com/tg/pl.js\"></script>";    document.write(appendStr);}

新闻源图片放到js里