随笔分类 -  javascript

原生态的脚本
摘要:列求和 var m = 0; $('#tb tr').each(function () { //td:eq(3)从0开始计数 $(this).find('td:eq(... 阅读全文
posted @ 2014-10-28 14:03 韩梦芫 阅读(944) 评论(0) 推荐(0) 编辑
摘要:将 JavaScript 值转换为 JavaScript 对象表示法 (Json) 字符串。JSON.stringify(value [, replacer] [, space])使用JSON.stringify将contact对象转换为 JSON 文本。定义memberfilter数组以便只转换s... 阅读全文
posted @ 2014-10-24 11:17 韩梦芫 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-10-11 11:10 韩梦芫 阅读(232) 评论(0) 推荐(0) 编辑
摘要:var a= new Array(new Array(1,2),new Array('b','c'));document.write(a[1][1]);说白了,就是利用for循环定义二维数组!//虚线部分还可以采用js Array内置对象的push()方法来实现,因为arr1.push(arr2)时... 阅读全文
posted @ 2014-10-09 19:13 韩梦芫 阅读(439) 评论(0) 推荐(0) 编辑
摘要:今天在写jquery代码时,alert()总是出现中文乱码琢磨了好一会儿,在网上查的资料是html页面上设置charset为GB2312结果发现还是乱码最终发现,在引用我写的js文件中设置charset为GB2312,然后就不出现乱码了 阅读全文
posted @ 2014-08-31 11:14 韩梦芫 阅读(1505) 评论(0) 推荐(0) 编辑
摘要:varWshShell =newActiveXObject('WScript.Shell') WshShell.SendKeys('{F11}');问题:Microsoft JScript 运行时错误: Automation 服务器不能创建对象解决方法:修复一下 Automation,可以把下面... 阅读全文
posted @ 2014-07-08 11:17 韩梦芫 阅读(836) 评论(0) 推荐(0) 编辑
摘要:escape不编码字符有69个:*,+,-,.,/,@,_,0-9,a-z,A-ZencodeURI不编码字符有82个:!,#,$,&,',(,),*,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,A-ZencodeURIComponent不编码字符有71个:!, ',(,),*,... 阅读全文
posted @ 2014-07-08 11:14 韩梦芫 阅读(202) 评论(0) 推荐(0) 编辑
摘要:1.丢弃小数部分,保留整数部分parseInt(5/2)2.向上取整,有小数就整数部分加1Math.ceil(5/2)3,四舍五入.Math.round(5/2)4,向下取整Math.floor(5/2)Math 对象的方法FF: Firefox, N: Netscape, IE: Internet... 阅读全文
posted @ 2014-07-08 11:11 韩梦芫 阅读(213) 评论(0) 推荐(0) 编辑
摘要:动态添加 Member List Name Class Birthday Constellation Mobile isaac W13 Jun 24th Cancer 1118159 girlwing W210 Sep 16th Virgo 1307994 tastestory W15 ... 阅读全文
posted @ 2013-11-20 21:26 韩梦芫 阅读(276) 评论(0) 推荐(0) 编辑
摘要://日期格式化Date.prototype.format = function (format) {/* * eg:format="yyyy-MM-dd hh:mm:ss"; */var o = {"M+": this.getMonth() + 1, // month "d+": this.getDate(), // day "h+": this.getHours(), // hour "m+": this.getMinutes(), // minute "s+": this 阅读全文
posted @ 2013-11-06 10:39 韩梦芫 阅读(204) 评论(0) 推荐(0) 编辑
摘要:escape()、encodeURI()、encodeURIComponent()区别详解JavaScript中有三个可以对字符串编码的函数,分别是: escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 。下面简单介绍一下它们的区别1 escape()函数定义和用法 escape() 函数可对字符串进行编码,这样就可以在所有的计算机上读取该字符串。语法 escape(string)参数 描述 string 必需。要被转义或编码的字符串。 返回值 已编码的 string 的副本... 阅读全文
posted @ 2013-09-25 16:20 韩梦芫 阅读(244) 评论(0) 推荐(0) 编辑
摘要:div id="img"> 源文件 http://www.cnblogs.com/siyunianhua/admin/Files.aspx 阅读全文
posted @ 2011-12-25 02:10 韩梦芫 阅读(443) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示