Home > Web Front-end > JS Tutorial > js simulates computer selection of multiple folders_selection code_javascript skills

js simulates computer selection of multiple folders_selection code_javascript skills

WBOY
Release: 2016-05-16 19:00:40
Original
1209 people have browsed it

代码很简单,会继续完善。。。
按住鼠标键不动,拖动鼠标,会看到效果


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

update:
1. 针对前2个beta版,该版本修复了前两个版本出现的 bug ,
2. 进行了代码的简单封装(由于本人初学js,对js掌握的很浅,因此面向对象的理解很差,封装的不好);
3. 增加了对 Ctrl 和 Shift 键的支持(目前shift键的功能和ctrl键的功能一样,还不能达到仿windows的选区Shift键的功能)。
4. 增加了获取“被选区选中元素”的方法,可以点击按钮“getRegions”看效果。
调用方法:
复制代码 代码如下:

new RegionSelect({
region:'div.fileDiv',
selectedClass: 'seled'
}).select();

增强效果代码

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Related labels:
js
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