蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 http://www.lslnet.com 2006年8月25日 8:28

(请大家来帮帮忙)如何在ASP页面中调用INC中的IF代码

请教如何在ASP中调用INC中的代码,也既是在ASP中调用文本中的代码,请问哪位高手知道呀

求助:如何在ASP页面中调用INC中的IF代码

include这个inc文件就可以直接用了。
当然也要看你的inc是怎么写的,如果是纯文件本的,直接引用可能会出现问题,程序打开文件读取内容再引入也可实现(比较保险的方法)。

求助:如何在ASP页面中调用INC中的IF代码

谢谢大家能帮我写一下,两个都写一下

比如我在INC文件中写入如下代码,请问看看需要怎么调用。
1、这个是随机调用写在INC文本中,请问在ASP页面中如何用。
<%dim MyCodes
randomize
MyCodes=(int(rnd()*3)+1)
if MyCodes=1 then
Response.write "<iframe marginwidth=0 marginheight=0  frameborder=0 bordercolor='#000000' scrolling=no src=http://adsence.sogou.com/index.html?pid=iturn_ah81&ww=111&dc=2&dir=0&num=5&color=3&charset=gb width=560 height=75></iframe>"
elseif MyCodes=2 then
Response.write "<iframe id=adframe marginwidth=0 marginheight=0 frameborder=0 scrolling=no src=http://pfpadv.sina.com.cn/cgi-bin/adv_key?id=32180&aid=ah81&mode=0&size=560&vwid=0&qty=5&row=1&col=1&border=dashed&kbox=1&btds=FFEA8B&btzs=0000FF&btks=FEC100&gdzs=A83300&ggyds=FDF9E1&ggbks=FFAD10&ggds=FFFFFF&ggbtzs=A83300&ggmszs=000000&sbox=1 width=560 height=75></iframe>"
else
Response.write "<iframe name=ads_pop src='http://union.cnpaiming.com/click/code2.asp?wuid=13' marginwidth=0 scrolling=no border=0 frameborder=0 width=468 height=60></iframe>"
end if
%>

2、这个是随机调用写在INC文本中,请问在ASP页面中如何用。
<%
Dim vAD(2)
vAD(0) = "<iframe marginwidth=0 marginheight=0  frameborder=0 bordercolor='#000000' scrolling=no src=http://adsence.sogou.com/index.html?pid=iturn_ah81&ww=111&dc=2&dir=0&num=5&color=3&charset=gb width=560 height=75></iframe>"
vAD(1) = "<iframe id=adframe marginwidth=0 marginheight=0 frameborder=0 scrolling=no src=http://pfpadv.sina.com.cn/cgi-bin/adv_key?id=32180&aid=ah81&mode=0&size=560&vwid=0&qty=5&row=1&col=1&border=dashed&kbox=1&btds=FFEA8B&btzs=0000FF&btks=FEC100&gdzs=A83300&ggyds=FDF9E1&ggbks=FFAD10&ggds=FFFFFF&ggbtzs=A83300&ggmszs=000000&sbox=1 width=560 height=75></iframe>"
vAD(2) = "<iframe name=ads_pop src='http://union.cnpaiming.com/click/code2.asp?wuid=13' marginwidth=0 scrolling=no border=0 frameborder=0 width=468 height=60></iframe>"
Randomize
Response.Redirect vAD(Int(Rnd * UBound(vAD)))
%>




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com