北美网备份站

标题: 测试代码:主要城市切换 [打印本页]

作者: admin    时间: 2016-9-15 02:09
标题: 测试代码:主要城市切换
<!--城市切换 -->' T- M, d( A) }" L/ {7 a3 i& P! P) F+ M
<style type="text/css">
  D+ V0 ?/ m# X0 b#city *{ margin:0;padding:0; z-index:1000000; top:0;left:0px; float:left;}
# Z0 i4 P1 |! n0 z" M) m; ^9 M- O#warpper{ position: relative; z-index:1000000; margin-top:20px;}4 Z  {0 c6 K8 n
#city { font:normal 12px Verdana, Arial, Helvetica, sans-serif; text-align:center; z-index:1000000;}: k6 `5 v1 M) k3 c' T% Q6 z, S
#city a{ cursor:pointer; color:#666}
# W2 g0 p8 B3 i7 d#city dl{ height:18px; line-height:18px; padding:0 10px;}
: T$ A8 b: F3 E, h8 w#city dt,.normal{ float:left; padding:0 10px 0 0 ; border-right:0px solid #ccc; text-decoration:none; width:auto; cursor:pointer; color:#FF3300; font-weight:bold;}, o  J: d# r+ c( A8 {% B% `, @; E; I
#city dt.over{ position:relative;padding:0 10px 0px 0px; z-index:1000001;color:#FF3300; font-weight:bold; height:20px; }
  x5 o: x& a2 `% n#city li{ float:left; list-style-type:none; margin:0px 5px; width:160px;}
4 r' g- u2 b" s7 _#city #c1 li a{ float:left; list-style-type:none; margin:0px 3px; 0 0 }% C7 R9 j/ X+ m, s7 g, ^. U. \$ [
#city dl dd{ position:absolute; width:160px; left:0;top:20px!important; border:1px solid #bbb; background:#fff; filter:progidXImageTransform.Microsoft.Shadow(Strength=4, Direction=120, color=#cccccc); padding:3px 0;}
0 ?& Q! G3 W( P: ^; O2 Q" _" d9 G.block{ display:block;}* c$ @/ G8 W5 Z" m
.none{ display:none;}$ A" G0 k! u: O8 V3 N5 ^* o
</style>
) e& a- N5 m% Q$ ~' G<script language="javascript">
7 n$ }' _/ k( q3 @7 zfunction $(str){ return document.getElementById(str);}
! I3 K' J7 v4 Q4 o/ c6 B! n* tfunction $$(str){ return document.getElementsByTagName(str);}( \5 G% v! B0 n
var timer;; W, h; `' b; T, p: d2 u3 D; r
function changeMenu(thisObj,num){
' s+ u, U1 U% U" `% Dif(thisObj.className=="over") return false;/ Y8 c) l) G! }/ m
hids(thisObj);
- U" I; `. ?# N8 _4 JthisObj.className="over";
! V/ c2 L' P$ I' K7 X$("c"+(num+1)).className="block";; T* b4 I- Z2 C
9 r( G# f  U( N$ d5 T5 `7 c
$("c"+(num+1)).onmouseover=function(){clearTimeout(timer);}2 i2 x/ ~$ Z9 D8 f2 f% ~  \! m& i5 T
$("c"+(num+1)).onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},500)}
/ C: M1 l: n+ \' w: P4 O, A  _thisObj.onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},3000)}! x) t; Y. W- f6 U) D
5 p3 l) I6 t# I) S" h
}
+ P' ^& b1 Z' y( B9 Dfunction hids(thisObj){
* T) k* y8 \# G  H' u# O$ ^& u+ wclearTimeout(timer);$ L# X* f  D5 L  B0 E/ l
var tabObj=thisObj.parentNode.getAttribute("id");1 p# }, i; S9 `# N3 C& E7 W/ \
var obj_dt=$(tabObj).getElementsByTagName("dt");
. K; I' k8 S8 }( xfor(var i=0;i<obj_dt.length;i++){, F1 ^7 p- k* U* d4 j" |5 V
obj_dt.className="normal";
+ `8 D) a& S/ s; Y  y$("c"+(i+1)).className="none";7 Y- q3 h, g4 T& w
}+ T% f5 Q# |2 ^, ^3 X! s/ a
}3 D( B# s5 Z% N6 u2 d$ [6 ^+ E
</script>
( M2 ]3 X8 c) S0 H7 {7 J<div id="city">5 M) i3 Y' P7 _! S
<dl id="warpper">; [: A. g, W- U& k( p4 T
<dt>[北美主要城市]</dt>
' l/ o0 A2 n% K3 i7 a) g/ F/ _) S3 z<dd id="c1" class="none">( u1 s; h7 U/ z( o9 a9 n3 G7 r
<ul>* l) q- O9 l5 K# A" N6 g8 Y+ D6 D+ b' H
<li><a href="xxx.html">洛杉矶</a> <a href="xxx.html">尔湾</a> <a href="xxx.html">旧金山</a> <a href="xxx.html">圣地亚哥</a> <a href="xxx.html">圣何塞</a> <a href="xxx.html">西雅图</a> <a href="xxx-1.html">纽约</a> <a href="xxx-1.html">波特兰</a> <a href="xxxx.html">奥兰多</a> <a href="xxxx.html">波士顿</a> <a href="xxxx.html">温哥华</a> <a href="xxxx.html">多伦多</a> <a href="xxxx.html">卡尔加里</a> <a href="xxxx.html">蒙特利尔</a>0 j2 E2 M" e5 O7 Q! \
</li>
. N( q8 ^* i# E8 v  y; m( V: ?</ul>
/ H" j7 P" Q: X% X! Y</dd>
' |6 V+ w5 p! ~( Y3 h- D</dl>! v! v& r1 i! E3 x5 I6 _

0 W+ W8 [. c$ q8 o# M8 O) f</div>
! M: [: K* ^5 f" _1 ^! n' H<!--城市切换_结束-->' i, I7 }1 D* r% x/ f
+ u/ B5 \% l6 }$ o' v. x, z

3 _! p, }. t6 o1 H9 x/ y8 l

作者: 北美生活网    时间: 2016-9-15 11:45
看到测试结果了。
作者: 蜻蜓点水    时间: 2016-9-16 12:14
http://beimeilife.duckdns.org/forum.php?mod=redirect&goto=findpost&pid=55897&ptid=30675
) b# `" G# [+ I3 o/ v& X/ N看到测试结果了。
+ o4 h# p4 c$ y+ e& ]( [* M8 k- z: E
各个城市的地产交易查询,可以上线了吗?




欢迎光临 北美网备份站 (http://beimeilife.duckdns.org/) Powered by Discuz! X3.2