经典ASP中的Javascript代码 [英] Javascript code in classic asp
本文介绍了经典ASP中的Javascript代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,我有一个JavaScript代码,我想在ASP文件中使用它,但是我的错误代码说:
Hello I have a JavaScript code and I want to use it in ASP file but my error code says:
Active Server Pages错误'ASP 0138'
Active Server Pages error 'ASP 0138'
嵌套脚本块
/reklamsag.html,第3行
/reklamsag.html, line 3
一个脚本块不能放在另一个脚本块内.
A script block cannot be placed inside another script block.
我的代码是:
<script src="http://ad.reklamport.com/scripts/rp.js" type="text/javascript"></script>
<script type="text/javascript">
document.write("<script src='http://ad.reklamport.com/rpgetad.ashx?tt=t_canvecan_anasayfa_300x250&ciid=&rnd="+Math.random()%99999999+"'></"+"script>");
</script>
有人说在外部文件中使用代码,并将其包含为asp文件,但我使用了此包含代码,但没有用:
Someone says use code in external file and include it asp file i use this include code but it didn't work:
<!--#include file="reklamsag.html"-->
推荐答案
有一种将单词"<script"
分为两部分的技术,例如"<scr"
和"ipt"
.
There is a technique to split the word "<script"
into two parts such as "<scr"
and "ipt"
.
document.write("<scr"+"ipt src....></scr"+"ipt>");
您的代码可以这样:
<script src="http://ad.reklamport.com/scripts/rp.js" type="text/javascript"></script>
<script type="text/javascript">
document.write("<scr"+"ipt src='http://ad.reklamport.com/rpgetad.ashx?tt=t_canvecan_anasayfa_300x250&ciid=&rnd="+Math.random()%99999999+"'></"+"scr"+"ipt>");
</script>
这篇关于经典ASP中的Javascript代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文