求将以下代码转成document.write()的格式
我有一段QQ在线状态的代码,需要转换成document.write();的格式,请高手帮忙!<ahref='http://sighttp.qq.com/cgi-bin/c...
我有一段QQ在线状态的代码,需要转换成document.write();的格式,请高手帮忙!
<a href='http://sighttp.qq.com/cgi-bin/check?sigkey=e567def244cdb269cc3eb241a578ac8d02eaa899e8cd316aaae96551bce4f476'; target=_blank; onclick='var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=e567def244cdb269cc3eb241a578ac8d02eaa899e8cd316aaae96551bce4f476';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;'><img border='0' SRC='http://wpa.qq.com/pa?p=1:123456789:47' alt='QQ留言'></a> 展开
<a href='http://sighttp.qq.com/cgi-bin/check?sigkey=e567def244cdb269cc3eb241a578ac8d02eaa899e8cd316aaae96551bce4f476'; target=_blank; onclick='var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=e567def244cdb269cc3eb241a578ac8d02eaa899e8cd316aaae96551bce4f476';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;'><img border='0' SRC='http://wpa.qq.com/pa?p=1:123456789:47' alt='QQ留言'></a> 展开
1个回答
展开全部
document.write ("<a href=\"http://sighttp.qq.com/cgi-bin/check?sigkey=f498da330a5554a367f9a460b4d75fdcda435b9cf6578239c9a966a55adc7dcc\"; target=_blank; onclick=\"var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=f498da330a5554a367f9a460b4d75fdcda435b9cf6578239c9a966a55adc7dcc';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;\"><img border=\"0\" SRC='http://wpa.qq.com/pa?p=1:372041883:47' alt=\"留言\"></a>")
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询