想改變如下的代碼,實現網頁中嵌入廣告的功能 ' s6 F! [* K% B
" g; M9 N4 Z9 S8 U+ z* G$ |8 W
代碼如下(部分):
4 g% ^1 S- t- q! Bsub content_down()
) r2 i: P0 {! aif rs("Grade")="0" then . X& C5 f1 P9 u) j- O0 Y$ M
hxGrade="遊客身份"
! c' @$ F( [7 p; n6 y) j) ^4 |1 eelseif rs("Grade")="1" then
+ y+ e0 V1 U* ~7 p( r, p7 B4 qhxGrade="會員身份"
5 j9 m5 N$ ~0 ielseif rs("Grade")="2" then
, y F( x, [/ U0 R3 AhxGrade="VIP身份" 8 z" p( A5 W3 k* F5 h% c* X+ u. K8 {+ Y
end if , C- W5 B( s3 j3 J
Response.Write "<table width=""100%"" border=""1"" align=""center"" cellspacing=""0"" cellpadding=""3"" bgcolor=""#FFFFFF"" bordercolor=""#f0f0f0"" style=""border-collapse: collapse"">" " f) s' I( R" H1 {" Q/ Q. O
Response.Write "<tr>" & vbCrLf
( ]5 n. {/ ~4 _$ I4 q5 x1 vResponse.Write "<td colspan=3 align='center' HEIGHT=30><b><font color=ff6600><b>"&rs("soft_name")&"</b></font><b></td>" & vbCrLf + R4 ]2 v1 v8 w- t0 [
Response.Write "</tr>" & vbCrLf 0 }$ `2 R, j* z6 \
Response.Write "<tr>" & vbCrLf 1 j8 [, T2 d* H G( [4 u% f* w7 r
Response.Write "<td height='25' align='center' width='15%'>加入時間</td>" & vbCrLf
# H! x* L% z# nResponse.Write "<td width='35%'> "&rs("soft_joindate")&"</td>" & vbCrLf
# p9 m. b3 e8 X" S0 {; r" H0 Y$ |Response.Write "<td rowspan='11' align='center' width='235'>" & vbCrLf ( M8 L4 k# O; K) x
if rs("soft_showpic")<>"http://hx66.net" then $ H* R: t0 t9 T7 s7 o! B/ H
Response.Write "<a href='"&rs("soft_showpic")&"' title='"&rs("soft_showpic")&"' target=_blank><img src='"&rs("soft_showpic")&"' border='0' valign='center'></a>" & vbCrLf
/ w$ }& L; D4 Y- j# eelse ( K4 v, |/ w2 e5 u( e0 I7 Z) W
Response.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf ' O/ M. i# E! K/ H
end if
7 r P8 A( {4 |0 h* XResponse.Write "</tr>" & vbCrLf
; I8 S/ o6 ~) ]9 I2 m: C8 R. E1 CResponse.Write "<tr>" & vbCrLf , B2 _! A% W6 p9 u
H$ g( h/ x, r5 k想要實現的網頁情況地址:http://www.vip138.com/showdown.asp?soft_id=28
7 g3 X n+ F) J) u, E6 |
" N0 A3 V, d4 c& T" V想通過修改這段語句: 9 G! f2 ^1 A; j ?# h6 A* |. X
if rs("soft_showpic")<>"http://hx66.net" then 0 K% `/ A; Q6 o) @: r. I
Response.Write "<a href='"&rs("soft_showpic")&"' title='"&rs("soft_showpic")&"' target=_blank><img src='"&rs("soft_showpic")&"' border='0' valign='center'></a>" & vbCrLf + Y+ C; X P$ w" a' u+ Y& S
else
Z. X; J& i8 N% jResponse.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf ( r& e8 n, q$ ]
end if % M! h# }7 t* i" p
實現:有圖片鏈接的時候,右側顯示圖片,沒有圖片鏈接的時候顯示以下代碼生成的公告
" p6 _8 B8 \: _7 ?8 y
5 J+ \- l4 i: o: R% W8 M廣告代碼如下:
' k( g# U5 J- j<script> " o' D( ?9 Q; R5 W$ Y( j
var YahooCNADConfig=new Array();
0 ]7 Q8 w4 F6 x1 }7 gYahooCNADConfig['adid']=363 & p: B f* I; T, }+ c V- l R: c9 r& x
YahooCNADConfig['wid']=XXXXX ; T! S* Y R/ `; t$ f% R
YahooCNADConfig['w']=141 1 o6 b K8 E* D& A
YahooCNADConfig['h']=60 5 ^- `, I+ e" I6 f
</script>
, b3 [0 L0 m3 p5 [1 I8 P; X<script type='text/javascript' src='http://view.aliunion.cn.yahoo.com/showad.php'></script> 5 w- y! |3 ~; n, |, a; z4 i0 i$ Q
! C$ M: r% d) Y: z, `# m% V7 g# [/ s請教如何將廣告代碼替換部分語句實現這個功能?謝謝 |
|