北美网备份站

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

作者: admin    时间: 2016-9-15 02:09
标题: 测试代码:主要城市切换
<!--城市切换 -->8 a" C7 u3 \+ ~9 a
<style type="text/css">
. y# r3 T; |/ V/ `#city *{ margin:0;padding:0; z-index:1000000; top:0;left:0px; float:left;}5 `! _4 P; ^( r' N3 f2 N8 q. Y! g
#warpper{ position: relative; z-index:1000000; margin-top:20px;}
) |1 z, U' f/ d; g6 x4 d9 E7 }6 [#city { font:normal 12px Verdana, Arial, Helvetica, sans-serif; text-align:center; z-index:1000000;}+ w2 b6 `# L' V+ ]% B
#city a{ cursor:pointer; color:#666}
4 u, l# x) |0 p, F* a( S! z! b#city dl{ height:18px; line-height:18px; padding:0 10px;}
! y$ X- w& G- p" e; O: z% I. {#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;}
9 v7 S4 K6 ?. ~#city dt.over{ position:relative;padding:0 10px 0px 0px; z-index:1000001;color:#FF3300; font-weight:bold; height:20px; }9 L: K3 P' J& H1 Q4 h5 L9 R
#city li{ float:left; list-style-type:none; margin:0px 5px; width:160px;}9 w4 A% _) N0 w) Q: t
#city #c1 li a{ float:left; list-style-type:none; margin:0px 3px; 0 0 }
1 i: u1 L. {  r- \7 G* l- F#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;}
8 ^+ X! P( `3 I7 o/ q.block{ display:block;}
- k3 q# b( [& J5 `# A.none{ display:none;}
! O: x6 Y5 [" w) f</style>" p) W! c3 Q3 x
<script language="javascript">
8 C  Q. N+ k& ~% {function $(str){ return document.getElementById(str);}
: m. m& U2 G: D. j+ h) `7 P' vfunction $$(str){ return document.getElementsByTagName(str);}
' V3 f3 o; j3 f- P# ^var timer;
# U# |1 t( V( P" Ffunction changeMenu(thisObj,num){7 c) _' A# q, Z7 @- ^  V3 t, m! }
if(thisObj.className=="over") return false;
& w: A8 O: F! Mhids(thisObj);
* `4 v* T* k. b6 xthisObj.className="over";
/ H/ L. K# i# d3 m$("c"+(num+1)).className="block";
/ Q( V1 P7 k% i
& F8 S1 }/ W/ U1 H$("c"+(num+1)).onmouseover=function(){clearTimeout(timer);}
' K/ \0 c2 K3 K8 \9 S& m$("c"+(num+1)).onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},500)}1 w5 X/ b2 w$ b$ U; Q9 s
thisObj.onmouseout=function(){timer=setTimeout(function(){hids(thisObj);},3000)}
7 {5 v# I1 A4 ^% c
) n5 l' I# j. }) c# ?}
* [) W  l) b; f( u& P$ xfunction hids(thisObj){
  J$ m) Z+ ?! VclearTimeout(timer);/ e  r+ D. q# q) w+ E9 d3 T
var tabObj=thisObj.parentNode.getAttribute("id");+ }( k9 u  y' B8 w+ x$ b6 a0 P8 u+ a
var obj_dt=$(tabObj).getElementsByTagName("dt");  V! R4 R/ Y% w( R9 H
for(var i=0;i<obj_dt.length;i++){
7 }  C* n3 c* K5 k7 {obj_dt.className="normal";* N( J, h. G  r+ K9 x
$("c"+(i+1)).className="none";
8 t9 J3 e& z2 L; r4 C8 u" l}# g  f, a5 V3 K, l5 u
}% \' U3 ]1 T  Q# A0 O" x+ N
</script>; ?: d7 u- T- s  C9 j
<div id="city">
0 w5 _$ ^# }: t; z" R0 T* B<dl id="warpper">
7 F: a  b1 B. G+ @& d7 k<dt>[北美主要城市]</dt>: ]  C' H& o: _( w2 R
<dd id="c1" class="none">
1 l/ C1 m, T5 Q<ul>, v) A( `& C8 V4 D
<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>5 V/ m( a7 C6 d. h; j; n1 n
</li>
& s& |* ]. Q% ?. Y) T</ul>
, O! w% `9 O! v; n# t2 a* {</dd>
! P; q/ W3 c6 U" {: e</dl>! M/ ]. K9 q/ Y. X" K8 {% l/ ^+ T( i, T

9 g# R" s: H4 B) k5 R</div>7 C; L$ x, E+ ~+ _$ A# M2 A* S  d( m
<!--城市切换_结束-->
3 ~$ M$ }* A1 u, k9 u4 p) I/ M, z
% U( y% b" v$ X& P8 t1 e0 c
4 V  i" z4 ^/ A1 O, F/ @

作者: 北美生活网    时间: 2016-9-15 11:45
看到测试结果了。
作者: 蜻蜓点水    时间: 2016-9-16 12:14
http://beimeilife.duckdns.org/forum.php?mod=redirect&goto=findpost&pid=55897&ptid=30675) @! @' Z+ C$ E
看到测试结果了。

/ I" U/ C0 q& c4 b各个城市的地产交易查询,可以上线了吗?




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