国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jQuery循環(huán)滾動新聞列表示例代碼

2019-11-20 14:27:40
字體:
來源:轉載
供稿:網(wǎng)友
最近由于項目原因,學習了下jquery,實現(xiàn)了一個小小的功能,就是點擊公告的上一條下一條來查看滾動條。具體代碼如下:
復制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta name="keywords" content=""><meta name="description" content="">
<title>test</title>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>

<style>
.banner_index { float:left; width:730px; height:239px; overflow:hidden; margin:5px 0 0 0;}
.banner_index_pic { width:730px; height:239px; overflow:hidden;}
</style>
</head>
<body scroll="yes">
<script type="text/javascript" src="jcarousellite_1.0.1.js"></script>
<div class="gg">
<li class="gg_btn">
<img src="pre_btn.jpg" border="0" id='gg_p' style="cursor: pointer;" title="上一條"/>
<img src="break_btn.jpg" border="0" id='gg_s' style="cursor: pointer;" title="暫停"/>
<img src="next_btn.jpg" border="0" id='gg_n' style="cursor: pointer;" title="下一條"/>
</li>
<li class="gg_info">
<a class="aa" style="cursor:hand" href="/notice/">
<b>網(wǎng)廳公告:</b></a>
<div id="dt_gg" style="display: none; float: left; width: 450px;">
<ul style="height:25px;overflow:hidden;">
<li style="width: 300px">
<a class="aa" href="/cms/web/default/new/notice/50514.shtml" title="關于調(diào)整全省固定電話本地電話網(wǎng)營業(yè)區(qū)間通話費上限標準的通知">
<span style="width:300px;">關于調(diào)整全省固定電話本地電話網(wǎng)</span>
</a>
<span style="width:100px;">[2010-06-24]</span>
</li>
<li style="width: 300px">
<a class="aa" href="/cms/web/default/new/notice/50515.shtml" title="中國電信機場/車站貴賓服務電子化認證公告">
<span style="width:300px;">中國電信機場/車站貴賓服務電子</span>
</a>
<span style="width:100px;">[2010-06-24]</span>
</li>
</ul>
</div>
</li>
</div>
<script type="text/javascript">
jQuery(function(){
jQuery('#dt_gg').css("display","block");
if(jQuery('#dt_gg').find('li').length>1){
jQuery('#dt_gg').jCarouselLite({
btnPrev:'#gg_n',
btnNext:'#gg_p',
btnAutoSwitch:'#gg_s',
visible: 1,
auto:5000,
speed:1000,
onMouse:true,
vertical:true
});
}else{
jQuery('#dt_gg').jCarouselLite({
visible: 1
});
}
});
jQuery(function(){
jQuery('#gg_s').click(function(){
if(jQuery(this).attr('src') == "/cms/web/images/V3/public/break_btn.jpg"){
jQuery(this).attr('src','/cms/web/images/V3/public/play_btn.jpg');
jQuery(this).attr('title','播放');
}else{
jQuery(this).attr('src','/cms/web/images/V3/public/break_btn.jpg');
jQuery(this).attr('title','暫停');
}
});
});
</script>
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 平昌县| 吉安县| 嘉义县| 阳春市| 中宁县| 汽车| 阳原县| 满城县| 四川省| 巩义市| 彭泽县| 台北县| 辽宁省| 浦东新区| 新干县| 花垣县| 喜德县| 漾濞| 塔河县| 涿州市| 密山市| 林口县| 安达市| 峨边| 安陆市| 鄱阳县| 临潭县| 潼南县| 巴中市| 泽普县| 饶阳县| 师宗县| 含山县| 万源市| 司法| 额尔古纳市| 伊通| 山阳县| 库车县| 汉寿县| 和静县|