`
文章列表

test

dsfdsfd
  以下为引用代码: <!doctype html>   <html>   <head>   <script type="text/javascript" src
在iOS6下开发webapp,使用inputz之file,很有用
gulpjs是一个前端构建工具,与gruntjs相比,gulpjs无需写一大堆繁杂的配置参数,API也非常简单,学习起来很容易,而且gulpjs使用的是nodejs中stream来读取和操作数据,其速度更快。如果你还没有使用过前端构建工具,或者觉得gruntjs太难用的话,那就尝试一下gulp吧。 本文导航: gulp的安装 开始使用gulp gulp的API介绍 一些常用的gulp插件 1、gulp的安装
IE兼容CSS3圆角border-radius,box-shadow,text-shadow的方法 1.下载ie-css3.htc   2.CSS box { -moz-border-radius: 15px; /* Firefox */ -webkit-border-radius: 15px; /* Safari 和 Chrome */ border-radius: 15px; /* Opera 10.5+, 以及使用了IE-CSS3的IE浏览器 */ -moz-box-shadow: 10px 10px 20px #000; /* Fi ...
ar supports = (function() {       var div = document.createElement(
一、取URL中的参数 function getParameterByName(name) { var match = RegExp('[?&]' + name + '=([^&]*)') .exec(window.location.search); return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); } 二、正则分组 var testStr="<div><img src='/ ...
打包构建工具gulp或grunt
   如果大家将一张网页看成一个form的话,大致上就成了一个web form的模型。在win form 下要想手动触发某一个对象的事件是很简单的,只要发送一条消息即可达成。(PostMessage) 但是网页并不是基于消息机制的,如果我们想在一张网页上写出一个类似于按键精灵的功能该如何实现呢?为大家介绍js下的几个方法:1. createEvent(eventType)参数:eventType 共5种类型:    Events :包括所有的事件.           HTMLEvents:包括 'abort', 'blur', 'change', 'error', 'focus', 'load ...
wx.ready(function(){ // 1 判断当前版本是否支持指定 JS 接口,支持批量判断 document.querySelector('#checkJsApi').onclick =function(){ wx.checkJsApi({ jsApiList:[ 'getNetworkType', 'previewImage' ], success:function(res){ ...
  微信的Javascript SDK发布,大家抢先观看代码实现吧! 相关功能: 分享到朋友圈  分享给朋友 
工厂制造新对象这个继承的想法相对简单,就是你需要什么 工厂制造什么然后返回给你需要的结果对象        function factory(){             return {                name:"china",                run:function(){
借助另一个函数的过程,修改他的context来实现,假设两个类        function Animal(){            this.name ="animal";            this.run = function(){                alert("hello i am animal");
(1)模拟类的方式, 我们都知道js是原型继承机制,不存在class和instance分离的这种方式假设,我们有两个类function  Animal(){        this.name = “animal”;
(function (window, document, $, undefined) { "use strict"; var startPoint, $currentEl, $fixEl, moving = false, $rootEl = $(document.documentElement), openSwipeEl = null; function touchMove(event) { var touch = event.to ...
Global site tag (gtag.js) - Google Analytics