|
想改变如下的代码,实现网页中嵌入广告的功能
4 L. n/ j3 x1 q5 K7 n; q, V/ `% f8 A4 n
代码如下(部分): % ]: @# w) G& W
sub content_down()
( e6 H1 h) p/ V. h! Dif rs("Grade")="0" then - V% m2 Y4 G/ ]4 d7 `
hxGrade="游客身份"
) j! x& _& S' l0 z9 ^1 P" W% \ melseif rs("Grade")="1" then
# T" n* S9 c9 O8 {( l' UhxGrade="会员身份"
8 F: J# `# ~7 w1 [- m0 q: E9 xelseif rs("Grade")="2" then ) i A% D, p/ k, ], j7 ~2 N8 O
hxGrade="VIP身份"
+ L# H- F5 X' `end if & g$ s5 v/ z7 F* |" S
Response.Write "<table width=""100%"" border=""1"" align=""center"" cellspacing=""0"" cellpadding=""3"" bgcolor=""#FFFFFF"" bordercolor=""#f0f0f0"" style=""border-collapse: collapse"">" + c1 O, `1 J+ J; c
Response.Write "<tr>" & vbCrLf F1 ]: t9 B M Q
Response.Write "<td colspan=3 align='center' HEIGHT=30><b><font color=ff6600><b>"&rs("soft_name")&"</b></font><b></td>" & vbCrLf
' A y7 ^1 V0 |( u$ g5 F4 bResponse.Write "</tr>" & vbCrLf ! I" A( E5 X( T) ?! k, W
Response.Write "<tr>" & vbCrLf 7 ]. }: C' q6 ]) Q: q2 a* B
Response.Write "<td height='25' align='center' width='15%'>加入时间</td>" & vbCrLf 4 L/ |" r0 x* E: J# k; U
Response.Write "<td width='35%'> "&rs("soft_joindate")&"</td>" & vbCrLf , {; g) P$ A8 g, L# ~& _5 p% {
Response.Write "<td rowspan='11' align='center' width='235'>" & vbCrLf
! q* Z* l+ r, v; ~! `if rs("soft_showpic")<>"http://hx66.net" then + @+ m9 ~; f: e4 a3 c; d( ?. d
Response.Write "<a href='"&rs("soft_showpic")&"' title='"&rs("soft_showpic")&"' target=_blank><img src='"&rs("soft_showpic")&"' border='0' valign='center'></a>" & vbCrLf
. B2 z+ P3 A; X4 o& ?( y8 melse ' K& j/ Q. i+ e! W: q
Response.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf 5 ]# q, e" H* i7 u1 p
end if
, U6 E; z5 g- J: r; {7 nResponse.Write "</tr>" & vbCrLf . u! ?" D Z: ]; n" L3 H
Response.Write "<tr>" & vbCrLf 3 l3 s8 r! H* ~" o! F5 c1 V7 S
+ a) t- }& @; @, T3 ~% P* H
想要实现的网页情况地址:http://www.vip138.com/showdown.asp?soft_id=28
% W* u* ^% d& q0 z C/ t. O4 y
& ^+ S1 ~1 k1 ^/ r想通过修改这段语句: 8 \4 J9 g& S" G [/ j" z y
if rs("soft_showpic")<>"http://hx66.net" then + @( y% Y- @7 Q; B- S9 ~% E5 m
Response.Write "<a href='"&rs("soft_showpic")&"' title='"&rs("soft_showpic")&"' target=_blank><img src='"&rs("soft_showpic")&"' border='0' valign='center'></a>" & vbCrLf
5 d. Q0 @6 X; A! J+ E: Q! Belse
2 y7 ~$ w+ D1 Z" K+ t0 rResponse.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf
1 `+ Q9 ?/ Y5 T1 y/ o) rend if $ @! _0 \7 v x' Q# Y
实现:有图片链接的时候,右侧显示图片,没有图片链接的时候显示以下代码生成的公告 ; @9 F2 Z/ u j4 y8 J
& Y0 ~: o D7 y广告代码如下: ' v( ]- U! ~* F. `' P
<script>
9 I4 F V- x7 j! x2 xvar YahooCNADConfig=new Array(); C1 R( B. n# U1 l/ F
YahooCNADConfig['adid']=363
+ N3 L5 N7 O$ r2 S: ZYahooCNADConfig['wid']=XXXXX ! `7 |, j, ^( o
YahooCNADConfig['w']=141 - c( o* e" ]- I- E6 g
YahooCNADConfig['h']=60
/ i/ e' D) h' b, p7 I</script> ' Q% T4 ` [- R5 n
<script type='text/javascript' src='http://view.aliunion.cn.yahoo.com/showad.php'></script>
3 V8 b/ b5 B3 J) s
% f7 q) b; E+ D V+ X3 m) f6 a0 {. Y+ T请教如何将广告代码替换部分语句实现这个功能?谢谢 |
|