1.re: 火车票很难买吗?
确实不知道其它地方,因为春运的时辰我也只到广州买过票
--JasonChou
2.你知道全国其它地方吗?
你知道全国其它地方吗?不知道就不要下结论。其它地方很难的,一票难求。
--啊可
3.re: Linux初体验认识
hello工作很棒,加油
--阿杰要措辞
4.re: 中小企业存在的一些问题
品题内容较长,点这儿标题查看
--阿杰要措辞
5.re: 火车票真难买
@Robin
呵呵,我是才结业一年的学生,以是还没遇到过这样的事情。。。
--JasonChou
今天写的页面里要求使成为事实广告图片自己主动转换的功效,在网上搜了一下,这个还满好用,先保藏<html><!-- 剧本代码开始 -->
<head>
<script language="JavaScript" type="text/javascript">
<!--
var bannerAD=new Array();
var adNum=0;
bannerAD[0]='cyjq_R_banner1.jpg';
bannerAD[1]='cyjq_R_banner2.jpg';
bannerAD[2]='cyjq_R_banner.jpg';
var preloadedimages=new Array();
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>JavaScript 图片切换展览效果</title>
</head>
<body>
<style type="text/css">
.container, .container *{margin:0; padding:0;}
.container{width:169px; height:323px; overflow:hidden;}
.slider{position:absolute;}
<input id="idReduce" type="button" value=" - 减时间 " />
<br /><br />
<input id="idReset" type="button" value=" Reset " />
</div>
<script type="text/javascript">
var $ = function (id) {
return "string" == typeof id ? document.getElementById(id) : id;
};
var Class = {
create: function() {
}
var TransformView = Class.create();
TransformView.prototype = {
//容器对于象,滑动对于象,切换参数,切换数量
initialize: function(container, slider, parameter, count, options) {
if(parameter <= 0 || count <= 0) return;
var oContainer = $(container), oSlider = $(slider), oThis = this;
this.Index = 0;//当前索引
this._timer = null;//定时器
this._slider = oSlider;//滑动对于象
this._parameter = parameter;//切换参数
this._count = count || 0;//切换数量
this._target = 0;//目标参数
this.SetOptions(options);
this.Up = !!this.options.Up;
this.Step = Math.abs(this.options.Step);
this.Time = Math.abs(this.options.Time);
this.Auto = !!this.options.Auto;
this.Pause = Math.abs(this.options.Pause);
this.onStart = this.options.onStart;
this.onFinish = this.options.onFinish;
oContainer.style.overflow = "hidden";
oContainer.style.position = "relative";
oSlider.style.position = "absolute";
oSlider.style.top = oSlider.style.left = 0;
},
//设置默认属性
SetOptions: function(options) {
this.options = {//默认值
Up: true,//是否向上(否则向左)
Step: 5,//滑动变化率
Time: 10,//滑动延时
Auto: true,//是否自己主动转换
Pause: 2000,//搁浅时间(Auto为true时有效)
onStart: function(){},//开始转换时执行
onFinish: function(){}//完成转换时执行
};
Object.extend(this.options, options || {});
//移动
Move: function() {
clearTimeout(this._timer);
var oThis = this, style = this.Up ? "top" : "left", iNow = parseInt(this._slider.style[style]) || 0, iStep = this.GetStep(this._target, iNow);
if (iStep != 0) {
this._slider.style[style] = (iNow + iStep) + "px";
this._timer = setTimeout(function(){ oThis.Move(); }, this.Time);
} else {
this._slider.style[style] = this._target + "px";
this.onFinish();
if (this.Auto) { this._timer = setTimeout(function(){ oThis.Index++; oThis.Start(); }, this.Pause); }
}
},
//获取步长
GetStep: function(iTarget, iNow) {
var iStep = (iTarget - iNow) / this.Step;
if (iStep == 0) return 0;
if (Math.abs(iStep) < 1) return (iStep > 0 ? 1 : -1);
return iStep;
},
//停止
var objs = $("idNum").getElementsByTagName("li");
var tv = new TransformView("idTransformView", "idSlider", 168, 3, {
onStart : function(){ Each(objs, function(o, i){ o.className = tv.Index == i ? "on" : ""; }) }//按钮范式
});
tv.Start();
Each(objs, function(o, i){
o.onmouseover = function(){
o.className = "on";
tv.Auto = false;
var objs2 = $("idNum2").getElementsByTagName("li");
var tv2 = new TransformView("idTransformView2", "idSlider2", 408, 3, {
onStart: function(){ Each(objs2, function(o, i){ o.className = tv2.Index == i ? "on" : ""; }) },//按钮范式
Up: false
});
tv2.Start();
Each(objs2, function(o, i){
o.onmouseover = function(){
o.className = "on";
$("idStop").onclick = function(){ tv2.Auto = false; tv2.Stop(); }
$("idStart").onclick = function(){ tv2.Auto = true; tv2.Start(); }
$("idNext").onclick = function(){ tv2.Index++; tv2.Start(); }
$("idPre").onclick = function(){ tv2.Index--;tv2.Start(); }
$("idFast").onclick = function(){ if(--tv2.Step <= 0){tv2.Step = 1;} }
$("idSlow").onclick = function(){ if(++tv2.Step >= 10){tv2.Step = 10;} }
$("idReduce").onclick = function(){ tv2.Pause-=1000; if(tv2.Pause <= 0){tv2.Pause = 0;} }
$("idAdd").onclick = function(){ tv2.Pause+=1000; if(tv2.Pause >= 5000){tv2.Pause = 5000;} }
$("idReset").onclick = function(){
tv2.Step = Math.abs(tv2.options.Step);
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |