Loading...
Boostrap模态框有一个名为enforceFocus的函数,一旦我们尝试将焦点集中到一个未包含在BS模态框中的元素,它立即将焦点放在模态本身上。所以我现在所做的就是从下面的文档解开focusin.bs.modal事件。它工作正常。 $('#team_info').on('shown.bs.modal', function() { $(document).off('focu...
SweetAlert是一个漂亮的、响应式的、可定制的和可访问的弹窗,可以替代Javascript原生的alert和confirm等函数呈现的弹出提示框。支持自定义标题、提示类型(成功,失败,警告...)、展示图片、自定义动画(animate.css)、Ajax 请求等等。使用方法:我们必须将SweetAlert插件的js文件和css文件引入到页面中。 <script src=&qu...
Lazy Load 是一款基于 jQuery 的图片延迟加载插件,它可以让浏览器可视区域外的图片不加载,当滚动到它们的位置时才加载。延迟加载可以使页面加载更快,减少服务器的负担,甚至是节约带宽。使用方法1.引入文件<script src="js/jquery.lazyload.js"></script>2.html <img class...
安装你可以从GitHub版本下载最新版本的Chart.js 或使用Chart.js CDN。可以在安装页面上找到详细的安装说明。创建图表由于项目中用的都是动态数据,下面将以商品价格表为例来创建折线图。Y轴表示商品价格,X轴日期。下面将创建一个id名为canvas的画布。 1.html 代码: <canvas id="canvas" ></canvas...
做Web开发的我们,表单验证是再常见不过的需求了。友好的错误提示能增加用户体验。来看bootstrapvalidator的描述:A jQuery form validator for Bootstrap 3。从描述中我们就可以知道它至少需要jQuery、bootstrap的支持。我们首先引入需要的js文件。 <script src="js/jquery-1.10.2.j...