码迷,mamicode.com
首页 >  
搜索关键字:function    ( 54714个结果
1.日期与时间
参考 几种设置将来时间的方式 时间计算 function getTimeRemaining(){ var time = new Date(), // 获取时间(2016-8-8 21.00) startTime = time.getTime(), // 转换毫秒数 endTime = Date.UT ...
分类:其他好文   时间:2016-08-27 11:16:49    阅读次数:160
jQuery操作Dom
1、添加元素 <code> <script language="JavaScript">$().ready(function(){$("input[type='button']").click(function(){var $li = $("<li/>").attr("id","sh").attr( ...
分类:Web程序   时间:2016-08-27 11:15:25    阅读次数:170
Cannot return from outside a function or method
最近发现myeclipse10中有几处bug 比如: Cannot return from outside a function or method onClick="return check();"出现错误等等 本人略总结了一点小方法,供参考: 方法一:window -->preferences ...
分类:其他好文   时间:2016-08-27 11:12:44    阅读次数:154
【LeetCode】217. Contains Duplicate 解题小结
题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the ...
分类:其他好文   时间:2016-08-27 11:11:23    阅读次数:110
LeetCode Reverse Vowels of a String
原题链接在这里:https://leetcode.com/problems/reverse-vowels-of-a-string/ 题目: Write a function that takes a string as input and reverse only the vowels of a s ...
分类:其他好文   时间:2016-08-27 07:36:31    阅读次数:157
LeetCode Reverse String
原题链接在这里:https://leetcode.com/problems/reverse-string/ 题目: Write a function that takes a string as input and returns the string reversed. Example:Given ...
分类:其他好文   时间:2016-08-27 06:33:11    阅读次数:209
开发自己的模板引擎
自定义模板引擎类 MyTpl.class.php 1 <?php 2 class MyTpl 3 { 4 private $tpl_vars = array(); 5 //分配 6 public function assign($key,$value){ 7 $this->tpl_vars[$key ...
分类:其他好文   时间:2016-08-27 06:20:37    阅读次数:123
socket.io
var app = require('express')(); var http = require('http').Server(app);var io = require('socket.io')(http); //服务端 io.on('connection',function(socket)) ...
分类:其他好文   时间:2016-08-27 00:35:18    阅读次数:183
344. Reverse String
题目:反转字符串 Write a function that takes a string as input and returns the string reversed. Example:Given s = "hello", return "olleh". 五种解法: 耗时56ms 耗时52ms ...
分类:其他好文   时间:2016-08-27 00:17:27    阅读次数:143
js 正则
functionisCheck(s){ varcheck_qiang=/^(?=.{10,})(((?=.*[A-Z])(?=.*[a-z])(?=.*\W))|((?=.*[A-Z])(?=.*[0-9])(?=.*\W))|((?=.*[a-z])(?=.*[0-9])(?=.*\W))).*$/; varcheck_zhong=/^(?=.{10,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9])))...
分类:Web程序   时间:2016-08-26 23:11:43    阅读次数:284
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!