例子:http://www.s1979.com/jkys/20141209/2547965.html
<script type="text/javascript" src="http://www.kmtl120.com/kjfz/JScript1.js?id=144"></script>
上面js里面的代码:
var baseStr = "id="; var baseHtml = "<p style="text-align: center;text-indent:0;auto;float:none;"><a href="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.kmtl120.com/tg/online/online_"; var baseHtml2 = ".gif" ></a></p>"; var Xsrc = 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.kmtl120.com/tg/pl.js"></script>"; document.write(appendStr); }