摘要: input标签,自闭合的<input> 不能向里插入其他元素 button 标签,是可以向里插入其他元素<button><img src=""></button> <input type="submit"> <input type="button"> <meta http-equit="X-UA-C 阅读全文
posted @ 2016-03-04 14:58 张鑫鑫是好人 阅读(132) 评论(0) 推荐(0) 编辑
摘要: var $ = require("wiki-common:widget/lib/jquery/jquery.js"), scrollTo = require('wiki-common:widget/util/scrollTo.js'); $('.qnItemWrap').on('click', fu 阅读全文
posted @ 2016-03-03 16:06 张鑫鑫是好人 阅读(271) 评论(0) 推荐(0) 编辑
摘要: typeof document.all 就是undefined console一下 document.all 就是一堆HTML ie下document.all就是true,其他就是false,可用来判断 ------------------------------------------------ 阅读全文
posted @ 2016-03-02 18:06 张鑫鑫是好人 阅读(95) 评论(0) 推荐(0) 编辑
摘要: AMD规范依赖commonjs, commonjs是require(.js);再执行其他, AMD多了一个回调,require(.js,callback);等异步加载完再去执行函数,但是同步会报错, 阅读全文
posted @ 2016-03-01 14:56 张鑫鑫是好人 阅读(125) 评论(0) 推荐(0) 编辑
摘要: var jQuery = require("jquery"); (function($) { jQuery.fn.scrollFix = function(height, dir) { height = height || 0; height = height == "top" ? 0 : heig 阅读全文
posted @ 2016-02-24 19:03 张鑫鑫是好人 阅读(418) 评论(0) 推荐(0) 编辑
摘要: $(".ajax").on("click", function() { // var newTab=window.open('about:blank'); var index = $(this).data("index"); $.post("/ajax/ope... 阅读全文
posted @ 2016-01-14 19:27 张鑫鑫是好人 阅读(778) 评论(0) 推荐(0) 编辑
摘要: http://www.zhihu.com/question/20394889http://www.zhangxinxu.com/wordpress/2009/11/css%E8%A1%8C%E9%AB%98line-height%E7%9A%84%E4%B8%80%E4%BA%9B%E6%B7%B1... 阅读全文
posted @ 2016-01-11 10:14 张鑫鑫是好人 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1. //浏览器判断 var userAgent = navigator.userAgent.toLowerCase(); var browser = { version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]... 阅读全文
posted @ 2016-01-06 11:38 张鑫鑫是好人 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 实现一个画板:1.容器canvas = document.getElementById('J-draw-canvas');ctx = canvas.getContext("2d");getContext() 方法可返回一个对象,该对象提供了用于在画布上绘图的方法和属性; 2.绘画和记录步骤ctx.b... 阅读全文
posted @ 2015-12-30 16:06 张鑫鑫是好人 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 1。。http://www.cnblogs.com/rubylouvre/p/5080464.html 能冒泡的事件event.bubbles属性判断是否冒泡,mouseenter 不会冒泡,只有鼠标穿过该元素时才会触发,mouseout 鼠标穿过该元素及子元素都会触发。2。。http://www.... 阅读全文
posted @ 2015-12-29 12:06 张鑫鑫是好人 阅读(208) 评论(0) 推荐(0) 编辑