1、简单方式Js代码var people ={};Js代码 people.name = "steven"; people.age = 23; people.getName = function(){ return "People's name is "+ this.name; };console.l...
分类:
其他好文 时间:
2014-09-03 11:14:26
阅读次数:
139
.On()其实.bind(), .live(), .delegate()都是通过.on()来实现的,.unbind(), .die(), .undelegate(),也是一样的都是通过.off()来实现的,这是1.8.2的源码:bind: function( types, data, fn ) { ...
分类:
Web程序 时间:
2014-09-03 11:07:46
阅读次数:
196
1 function replace_unicode_escape_sequence($match) { 2 return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); 3 } 4 $name = '\u65b0\u....
分类:
Web程序 时间:
2014-09-03 11:03:36
阅读次数:
230
//// main.cpp// function_adaptor//// Created by IDM-PKU on 14-9-3.// Copyright (c) 2014年 PKU. All rights reserved.//#include #include #include #in...
分类:
其他好文 时间:
2014-09-03 11:00:06
阅读次数:
229
安装 npm?install?ws 服务端 server.js var?WebSocketServer?=?require(‘ws‘).Server
??,?wss?=?new?WebSocketServer({port:?8080});
wss.on(‘connection‘,?function(ws)?{
????ws.on(‘messag...
分类:
Web程序 时间:
2014-09-03 09:46:06
阅读次数:
188
{ wait:90, hsTime:function(that){ if (this.wait == 0) { $('#hsbtn').removeAttr("disabled").val('重发短信验证码'); ...
分类:
Web程序 时间:
2014-09-03 09:35:56
阅读次数:
212
//第一篇博文,希望大家多多支持/***** BasePage.js 公共的 脚本文件 部分方法需引用jquery库 *****///#region 日期操作//字符串转化为时间。function stringtoTime(date1) { var dt = new Date(Date.parse(...
分类:
Web程序 时间:
2014-09-03 08:21:46
阅读次数:
315
用Javascript正则控制文本框只能输入整数或浮点数。JS部分代码:function CheckInputIntFloat(oInput) { if('' != oInput.value.replace(/\d{1,}\.{0,1}\d{0,}/,'')) { oInput.value = oI...
分类:
Web程序 时间:
2014-09-03 06:12:56
阅读次数:
231
$scope.totalPrice = function () { return $scope.addcartProduct.reduce(function (money, product) { re...
分类:
编程语言 时间:
2014-09-02 22:47:15
阅读次数:
215