![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
robert_zhai
Life is short, cherish what we have owned !
My github is https://robertzhai.github.io 。
展开
-
Object-Oriented JavaScript
JavaScript is object-oriented programming language. We can define some object structure for our use.Every object in JavaScript is an instance of the object Object and therefore inherits all it转载 2012-12-24 13:52:28 · 364 阅读 · 0 评论 -
http://vanilla-js.com/
http://vanilla-js.com/转载 2014-03-04 13:45:05 · 1558 阅读 · 0 评论 -
iframe 上传图片
由于ajax的局限,无刷新上传文件用iframe来提交就可以了,form表单的target值为iframe的name值,然后用ifrmae的onload事件来处理iframe提交的返回值$("#frm_dealer").load(function(){var return_json = $(window.frames['frm_dealer'].do原创 2014-03-23 15:43:43 · 533 阅读 · 0 评论 -
JavaScript-Garden
http://bonsaiden.github.io/JavaScript-Garden/zh/转载 2014-07-24 23:31:59 · 439 阅读 · 0 评论 -
infinitescroll
$(document).ready(function (){ $("#postswrapper").infinitescroll({ navSelector: "#navigation", //页面分页元素--成功后自动隐藏 nextSelector: "#navigation a原创 2014-11-22 23:02:35 · 623 阅读 · 0 评论 -
页面自动跳转
页面自动跳转中,等待时间:3秒(function(){var wait = document.getElementById('wait'),href = document.getElementById('href').href;var interval = setInterval(function(){var time = --wait.innerHTML;if(t原创 2015-04-24 11:20:53 · 1012 阅读 · 0 评论 -
plupload
http://www.plupload.com/docs/Getting-Started转载 2015-10-08 13:42:20 · 458 阅读 · 0 评论 -
zeptobuilder
自定义zepto包的库, : http://github.e-sites.nl/zeptobuilder/ , 库文档 http://zeptojs.com/原创 2016-10-14 10:34:05 · 753 阅读 · 0 评论 -
<<JavaScript Enlightenment>> note
> pdf下载:https://github.com/robertzhai/ebooks/blob/master/client/JavaScript_Enlightenment.pdf✴ An object is made up of named properties that store values.✴ Most everything in JavaScript can原创 2016-10-22 08:01:04 · 331 阅读 · 0 评论 -
《Web全栈工程师的自我修养》-好书推荐
腾讯一线八年实战历练,从腼腆的菜鸟程序员到才情兼备的技术大拿,全栈工程师兼修的修炼手册。,作者博客:https://yuguo.us/weblog/full-stack-engineer/, 电子书下载:百度网盘下载 。原创 2016-10-30 08:08:41 · 3114 阅读 · 0 评论 -
jshint 检查js文件代码规范
1. 安装npm install -g jshint 2.使用1)单文件jshint main.js2)文件夹jshint folder/*输出类似下面的: 3.参考文档:http://jshint.com/docs/原创 2016-11-10 17:11:07 · 1753 阅读 · 0 评论 -
http://nqdeng.github.io/7-days-nodejs/
http://nqdeng.github.io/7-days-nodejs/转载 2014-03-03 14:09:34 · 1487 阅读 · 0 评论 -
js back to top
function check_scroll() { if($(window).scrollTop()>=100) { $(".back2top_fat").fadeIn(); }else { $(".back2top_fat").fadeOut(); }}$(function() { setInterval("c原创 2014-01-06 22:16:22 · 1202 阅读 · 0 评论 -
js 图片高度按比例缩放
$(document).ready(function() { $('.i_w_f > img').each(function() { var maxWidth = 225; // 图片最大宽度 var maxHeight = 337; // 图片最大高度 var ratio = 0; // 缩放比例 var width = $(this).原创 2014-01-05 17:12:38 · 3605 阅读 · 0 评论 -
JS Number String转换
方法主要有三种转换函数、强制类型转换、利用js变量弱类型转换。1. 转换函数:js提供了parseInt()和parseFloat()两个转换函数。前者把值转换成整数,后者把值转换成浮点数。只有对String类型调用这些方法,这两个函数才能正确运行;对其他类型返回的都是NaN(Not a Number)。一些示例如下:parseInt("12转载 2012-12-21 10:39:29 · 29339 阅读 · 0 评论 -
浏览器插件总结
主要用了jsonp加载非同源资源,因为ajax不能跨域,然后就是js界面渲染和样式变换。原创 2013-04-07 23:06:03 · 477 阅读 · 0 评论 -
新浪微博一键分享
分享至微博 http://open.weibo.com/wiki/ShareCode是闭包的经典实例。原创 2013-04-11 19:55:33 · 657 阅读 · 0 评论 -
一键分享代码
腾讯QQ的微博分享代码:http://v.t.qq.com/share/images/s/b24.png" border="0"> function postToWb(){ var _t = encodeURI(document.title); var _url = encodeURI(document.location); var _appkey =转载 2013-05-25 13:29:56 · 3743 阅读 · 0 评论 -
JavaScript的性能优化:加载和执行
http://blog.jobbole.com/47304/转载 2013-09-05 16:43:40 · 544 阅读 · 0 评论 -
js closure timer
22(function(){var wait = document.getElementById('wait'),href = document.getElementById('href').href;var interval = setInterval(function(){var time = --wait.innerHTML;if(time locat转载 2013-09-20 09:57:43 · 495 阅读 · 0 评论 -
网页素材大全
http://js.itivy.com/?cat=5转载 2013-10-24 13:04:28 · 536 阅读 · 0 评论 -
jQuery插件demo
http://www.jquery001.com/how-to-write-jquery-plugin.html(function ($) { $.fn.extend({ //插件名称 - paddingList paddingList: function (options) { //参数和默认值转载 2013-11-16 19:29:17 · 527 阅读 · 0 评论 -
js 日历组件
http://code.google.com/p/lhgcalendar/downloads/detail?name=lhgcalendar-3.0.0.rar&can=2&q=原创 2013-11-06 13:28:08 · 713 阅读 · 0 评论 -
js lgdialog 组件
https://code.google.com/p/lhgdialog/downloads/list原创 2013-11-06 13:29:16 · 744 阅读 · 0 评论 -
gulp 学习总结
gulp 可以压缩静态资源 css,js,images ,通过gulp 可以让这些自动化,gulp 的 pipe 就像管道一样来处理静态资源。gulp 的配置文件见后,完整的项目demo请访问:https://github.com/robertzhai/web_build/tree/master/gulp-practise//gulpfile.js// Inc原创 2016-11-11 10:23:09 · 1045 阅读 · 0 评论