Rumah > hujung hadapan web > tutorial js > 写了几个类,希望对大家有用。_javascript技巧

写了几个类,希望对大家有用。_javascript技巧

WBOY
Lepaskan: 2016-05-16 19:23:18
asal
1193 orang telah melayarinya

1.日历


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

2.简单的下拉菜单

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

3. QQ菜单效果
'; } } else { window.alert('arguments error!'); } } else { _bool = _bool & (typeof(_array[1]) == 'string'); _bool = _bool & (typeof(_array[2]) == 'string'); _bool = _bool & (typeof(_array[3]) == 'string'); if (!_bool) { _html += '
'; _html += ''; _html += '
'; } else { window.alert('arguments error!'); } } return _html; })(_barList[i]); this.box.appendChild(_tool); this.barList[this.barList.length] = _bar; this.toolList[this.toolList.length] = _tool; if (_bool) { this.barCurrent = _bar; this.toolCurrent = _tool; _bool = false; } } } this.doClick = function() { var _eventBar = window.event.srcElement; with (oTencent) { if (!oTime && (barCurrent != _eventBar)) { for (var i=0; i 0) ? (parseInt(height) - this.barAmount) : 1 ; } with (this.toolCurrent.style) { height = ((parseInt(height) + this.barAmount)

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
4.对联效果
'; _html += '
'; _html += this.content; _html += '
'; return _html; } this.doScroll = function() { var _left = document.getElementById('oCouplet_left'); var _right = document.getElementById('oCouplet_right'); var _oTop = parseInt(_left.style.top); var _nTop = parseInt(document.body.scrollTop) + this.top; if (_oTop 0) { _left.style.top = _right.style.top = _oTop + 1 + 'px'; var oTime = window.setTimeout('oCouplet.doScroll()', this.delay); } else { window.clearTimeout(oTime); } } else { if ((_oTop - _nTop) > 0) { _left.style.top = _right.style.top = _oTop - 1 + 'px'; var oTime = window.setTimeout('oCouplet.doScroll()', this.delay); } else { window.clearTimeout(oTime); } } } } window.onload = function() { var oTop = 50, oWidth = 120, oHeight = 250, oOffset = 20; var oDelay = 80, oAmount = 1; oCouplet = new Couplet(oTop, oWidth, oHeight, oOffset, oDelay, oAmount); with (document.body) { innerHTML += oCouplet.drawCouplet(self.oContent.innerHTML); onscroll = function() { oCouplet.doScroll(); } } }
对联内容
 
Salin selepas log masuk

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
5.图片轮换

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

6.listView类

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

7.表单多文件上传类 [ASP] 
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan