想改變如下的代碼,實現網頁中嵌入廣告的功能
1 _. @( H/ ]* `" l9 g" Y. v5 i3 `# n2 e
代碼如下(部分):
8 G: Z }# Q1 h7 d( Msub content_down()
O- L. f, P0 N8 ?0 l6 nif rs("Grade")="0" then
, B% K8 i( s% P$ ]- E) lhxGrade="遊客身份" 0 I2 F! U; @, X) E, g' h
elseif rs("Grade")="1" then
: g1 M- _1 Q, S8 `3 DhxGrade="會員身份"
( D A: i7 S2 x2 p$ \: \elseif rs("Grade")="2" then " s. }& n# b) C" a5 K
hxGrade="VIP身份"
; R- `. N4 o: Z3 P8 Y5 ?, h1 Eend if
. J; \/ K7 o$ ^Response.Write "<table width=""100%"" border=""1"" align=""center"" cellspacing=""0"" cellpadding=""3"" bgcolor=""#FFFFFF"" bordercolor=""#f0f0f0"" style=""border-collapse: collapse"">" " f. W% l8 I1 a! J
Response.Write "<tr>" & vbCrLf
1 I: J5 w7 F5 l* z. ^; }+ o$ s2 aResponse.Write "<td colspan=3 align='center' HEIGHT=30><b><font color=ff6600><b>"&rs("soft_name")&"</b></font><b></td>" & vbCrLf 1 p" I! q! g \9 i4 q& d w
Response.Write "</tr>" & vbCrLf
2 h6 ?8 _7 j2 [$ \% SResponse.Write "<tr>" & vbCrLf + ?. [% W! N% }! z; T
Response.Write "<td height='25' align='center' width='15%'>加入時間</td>" & vbCrLf
- b0 V* v3 B3 ?Response.Write "<td width='35%'> "&rs("soft_joindate")&"</td>" & vbCrLf
* n0 U, W/ N' d: n- eResponse.Write "<td rowspan='11' align='center' width='235'>" & vbCrLf 4 T6 F. L/ B6 Y4 i9 z' v
if rs("soft_showpic")<>"http://hx66.net" then . Z% u1 c: `" Z; _. E
Response.Write "<a href='"&rs("soft_showpic")&"' title='"&rs("soft_showpic")&"' target=_blank><img src='"&rs("soft_showpic")&"' border='0' valign='center'></a>" & vbCrLf 6 M5 c- c u- x4 E1 g8 A
else / ?0 @: `8 n# ?6 R
Response.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf
; e6 h7 ?1 x: g' L/ v: Y7 C3 r6 ?end if
# Y- s' m" R6 ~; d# \Response.Write "</tr>" & vbCrLf ! w( T2 d$ y( U& @1 P
Response.Write "<tr>" & vbCrLf C: H! J% F/ b' O2 s1 }
" }$ k! D3 I) e1 N( C) ^
想要實現的網頁情況地址:http://www.vip138.com/showdown.asp?soft_id=28
& v" D( s3 ?. x9 i4 i$ L0 m! _0 h9 g
想通過修改這段語句:
) R$ w8 T- _5 q- _# l; uif rs("soft_showpic")<>"http://hx66.net" then
# ]0 B( k; E0 _: X# {$ Q3 ?Response.Write "<a href='"&rs("soft_showpic")&"' title='"&rs("soft_showpic")&"' target=_blank><img src='"&rs("soft_showpic")&"' border='0' valign='center'></a>" & vbCrLf 9 Y9 R) u& h3 @5 N, j3 {6 i
else
, g, s) J% |( U4 i- _3 fResponse.Write "<img src='img/nopic.gif' border='0' valign='center'>" & vbCrLf
& b7 y" g5 n, B( yend if
! V8 A4 H' X5 h1 S F& _3 w實現:有圖片鏈接的時候,右側顯示圖片,沒有圖片鏈接的時候顯示以下代碼生成的公告 ( v5 Z3 n& E. K3 H. k
1 B0 h& \/ ~% A! A# D: q$ w0 F4 u廣告代碼如下:
5 Y- S& t; H' w; p/ N7 k, ~<script> 1 _ n1 h- j5 A
var YahooCNADConfig=new Array(); , x1 M5 S* l8 b" {
YahooCNADConfig['adid']=363 + L8 ^# R- d9 B; z5 A
YahooCNADConfig['wid']=XXXXX $ M$ C" m, E4 h! d, r: e
YahooCNADConfig['w']=141
6 H# e# {1 H; R0 |, J5 a3 n) w( X: mYahooCNADConfig['h']=60
4 P. R& {& ?/ [, x8 q( ~ \</script> ! U+ D! u7 P- m6 G
<script type='text/javascript' src='http://view.aliunion.cn.yahoo.com/showad.php'></script> . Q' r4 w: ]% L4 a: A' K
/ q* g" z( A5 H [
請教如何將廣告代碼替換部分語句實現這個功能?謝謝 |
|