2018年3月22日
摘要: https://www.sojson.com/gongju/textdiff.html 阅读全文
posted @ 2018-03-22 15:14 vsmart 阅读(783) 评论(0) 推荐(0) 编辑
摘要: // 模拟jquery trigger主动触发事件 var fireEvent = function(element,event){ if (document.createEventObject){ // IE浏览器支持fireEvent方法 var evt = document.createEventObject(); return el... 阅读全文
posted @ 2018-03-22 14:02 vsmart 阅读(667) 评论(0) 推荐(0) 编辑
摘要: var obody = document.querySelector('body'); (obody.onclick = function(){ alert(555) //555 })() var obody = document.querySelector('body'); obody.onclick = (function(){ alert(555) //555 })()... 阅读全文
posted @ 2018-03-22 13:58 vsmart 阅读(155) 评论(0) 推荐(0) 编辑
摘要: function clone(obj){ var type = Object.prototype.toString.call(obj).slice(8,-1).toLowerCase(); if(type=='object'){ var json = {}; for(i in obj){ if(obj.hasOwnProperty(i)){ json[i] = clon... 阅读全文
posted @ 2018-03-22 13:46 vsmart 阅读(835) 评论(0) 推荐(0) 编辑