ITeye博客

Javascript

共 7 篇文章

网页滚动时的动画效果插件

https://www.delac.io/WOW/ https://github.com/matthieua/WOW https://github.com/johnpolacek/superscrollorama 留个爪印

2019-04-28 09:11 · Javascript

layui Cannot read property 'createDocumentFragment' of undefined

Cannot read property 'createDocumentFragment' of undefined layui2.4的table模块添加了toolbar等属性,于是把项目的layui2.2升级,运行程序js一直报错。 Cannot read property 'createDocumentFragment' of undefined 应该是没有识别到某个属性。 后来发现layui.js还是原来的版本,后来在chrome调试模式里把cache清除了,layui加载变成新的2.4.5版之后,一切运行正常。

2018-11-14 02:15 · Javascript

JavaScript的匿名函数返回,

https://blog.csdn.net/conatic/article/details/61627183 看到一篇。 //函数里放一个匿名函数---闭包 function box (){ return function(){ return 'Lee'; } } alert(box); //function box(){return function(){return 'Lee'}} alert(box());//function (){return 'Lee'} alert(box()());//Lee

2018-10-22 11:44 · Javascript

Requirejs学习

一个很详细的说明资料。 http://www.php.cn/js-tutorial-392533.html

2018-10-21 17:05 · Javascript · requirejs

requriejs加载layui

exports 的意思是,针对那些老旧的,没有按照 AMD 规范声明的代码,把他们暴露在 window 下的对象名,映射到 key 上去。 打个比方,假设你的 hello.js 是老旧的,没按 AMD 规范的,如下: (function() { window.h = { hello: function() { alert('hello'); } }; }()); 然后这样配置 shim : shim: { 'hello': { exports: 'h' } } 意思是,当 hello.js 加载完毕后,从 window.h 里取出 hello.js 定义的内容,赋值给 requirejs 的…

2018-10-14 12:34 · Javascript

$Post传参

通过POST传参的话,HttpServletRequest接收参数的方法 request.getParameter(String) request.getParameterValues(String) request.getParameterNames() 一个一个介绍,第一种getParameter(String),这种接收参数方法用于接收单个参数或者多个参数(多个参数用英文逗号隔开),方法内传递一个String类型的参数名,请求地址如下:singleParam?param=Jack,Rose,Tom(我这个在struts2中的写法),前端代码如下: <a href="singlePara…

2017-04-06 22:33 · Struts2 · Javascript

CasperJS PhantomJS

因为要做一个模拟网页登录的一个测试代码,搜索了一下网页。发现很多用Node.js。Python写爬虫的介绍, 发现下面一个js库,Python在学习,Node.js看来也得去学习学习。 CasperJS[1] 是一个开源的导航脚本处理和测试工具,基于PhantomJS(前端自动化测试工具)编写。CasperJS简化了完整的导航场景的过程定义,提供了用于完成常见任务的实用的高级函数、方法和语法。 PhantomJS 是一个基于 WebKit 的服务器端 JavaScript API。它全面支持web而不需浏览器支持,其快速,原生支持各种Web标准: DOM 处理, CSS 选择器, JSON,…

2015-06-04 09:52 · Javascript