码迷,mamicode.com
首页 >  
搜索关键字:下拉菜单 sel function    ( 68645个结果
百度移动版的url编码解码代码
1 var decode = function(m) { 2 try { 3 m = decodeURIComponent(m); 4 } catch(e) {} 5 var s = m.split("%"); 6 if (s.length > 1)...
分类:移动开发   时间:2014-04-30 20:11:33    阅读次数:590
utf-8页面展示 gbk编码的js,gbk中有中文
index.html星月随笔这个页面中的 charset编码可以变成其他的。utf-81.js (编码方式 utf-8)function getPageCharset(){ var charSet = ""; var oType = getBrowser(); switch(...
分类:Web程序   时间:2014-04-30 13:10:20    阅读次数:443
PHP 单例
1 sign=mt_rand(1,100000);12 }13 14 final protected function __clone(){15 16 }17 18 protected static function getIns(){19 if(!...
分类:Web程序   时间:2014-04-29 16:30:19    阅读次数:415
通过正则写一个较为完美的getByClass函数
getByclass传入两个参数,oParent是父集,sClass是要传入class名称 1 function getByClass(oParent,sClass){ 2 var aChild = oParent.getElementsByTagName("*"), 3 r...
分类:其他好文   时间:2014-04-29 16:27:10    阅读次数:366
10-Objective-C特有语法:Category、类对象、description、SEL、NSLog输出增强
一、 分类-Category1. 基本用途OC中如何在不改变原来类模型的前提下,给类扩充一些方法?有2种方式 1>.继承 2>.分类(Category)2. 格式分类的声明@interface 类名 (分类名称)// 方法声明@end分类的实现@implementation 类名 (分类名称)/.....
分类:其他好文   时间:2014-04-29 11:23:47    阅读次数:384
js 验证手机号码
js 验证手机号码 //验证手机号 function isMobel(value) { if (/^1[3-8]+\d{9}$/g.test(value)) { return true; } else { return false; } }
分类:移动开发   时间:2014-04-29 11:12:46    阅读次数:369
HTML DOM event 事件 (丫头, 好想你了)
HTML DOM event 事件, 用用就知道了function isKeyPressed(eventssdasd) // 这个地方其实无关紧要,就是定义一个名称而已, 不过为了好看, 最好还是写成 event{ if (event.altKey==1)//event代表事件的状态,例如触发eve...
分类:Web程序   时间:2014-04-29 10:26:46    阅读次数:474
Jquery CSS 操作 - height() 方法
一、height() 方法 height() 方法返回或设置匹配元素的高度$(".btn1").click(function(){ $("p").height(50);});height方法事例
分类:Web程序   时间:2014-04-29 10:17:45    阅读次数:411
关于 NSTimer 的使用
+ (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(id)userInfo repeats:(BOOL)yesOrNo;+ (NSTime...
分类:其他好文   时间:2014-04-29 10:11:45    阅读次数:389
封装函数getClient获取当前显示区域的大小,即clientWidth和clientHeight
1 //获取当前显示区域的大小,即clientWidth和clientHeight 2 function getClient(){ 3 var isXHTML; //初始值默认 符合DOM的xHTML标准 4 var clientWidth,clientHeight; 5 if(docume...
分类:其他好文   时间:2014-04-29 09:36:46    阅读次数:465
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!