Home > Web Front-end > JS Tutorial > 写了几个类,希望对大家有用。_javascript技巧

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

WBOY
Release: 2016-05-16 19:23:18
Original
1185 people have browsed it

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(); } } }
对联内容
 
Copy after login

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

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

6.listView类

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

7.表单多文件上传类 [ASP] 
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template