html & css & js
kick5578
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
typeof 与 instanceof
typeof只能够确定六种数据类型 1. number 2. boolean 3. string 4. function 5. object 6. undefined 语法: 1. typeof varName 2. typeof(varName) 使用: var i = 1; if(typeof i == "num原创 2013-03-06 22:57:48 · 491 阅读 · 0 评论 -
ajax工具方法
/* * 获取ajax对象 */ function getXmlHttpRequest(){ var xhr = null; if(typeof(XMLHttpRequest) != 'undefined'){ xhr = new XMLHttpRequest(); }else{ xhr = new ActiveXObject("Micr原创 2013-03-06 18:04:42 · 658 阅读 · 0 评论 -
function 与 new function 区别
1. function function test(){ var i = 1; this.j = 2; alert(i + j); } js通用的定义function的方式. this.j 变量属于test方法的所有者window对象 2. function var test = function(){ var i = 1; thi原创 2013-03-06 18:11:57 · 857 阅读 · 0 评论 -
js 编码
escape/unescape : 不能对uri编码, 会把 / ? @ 进行编码 encodeURIComponet/decodeURIComponent : 对URI参数编码, 会把 / 进行编码 encodeURI/decodeURI : 对URI编码 From : http://blog.163.com/free_for_all/blog/static/687原创 2013-03-06 17:02:23 · 590 阅读 · 0 评论 -
检查中文
java public static boolean isChnsStr(String source){ return source.matches("^[\u4e00-\u9fa5]*$")?true:false; } js原创 2013-03-06 18:03:24 · 536 阅读 · 0 评论 -
js全局变量和局部变量
全局变量 1. 方法外 var variableName = "variableValue";variableName = "variableValue"; 2. 方法内 variableName = "variableValue";window.variableName = "variableValue"; 局部变量 1. 方法内 var variableName =原创 2013-03-06 18:07:18 · 561 阅读 · 0 评论
分享