最高半折刷qq各种业务和钻(家里人自己开的,尽管放心,大家多捧捧场)

sking7

导航

上一页 1 ··· 6 7 8 9 10 11 下一页

2011年10月14日 #

JavaScript中获取java中字符串出错

摘要: jsp页面java代码String titleImageStr = request.getParameter("titleImage")==null?"":request.getParameter("titleImage");js代码var titleImageVar="<%=titleImageStr%>";目的是想在js中获得传过来的参数但浏览器总是报js异常右键看页面源码发现。。titleImageStr变量里面有"(双引号)解决方案:1.var titleImageVar='& 阅读全文

posted @ 2011-10-14 12:43 G.N&K 阅读(197) 评论(0) 推荐(0)

2011年10月13日 #

javascript的类型转换,操作符介绍和运用

摘要: 看到一篇文章讲类型转换http://bonsaiden.github.com/JavaScript-Garden/zh/#types.castingJavaScript 是弱类型语言,所以会在任何可能的情况下应用强制类型转换。// 下面的比较结果是:true1 new Number(10) == 10; // Number.toString() 返回的字符串被再次转换为数字2 3 10 == '10'; // 字符串被转换为数字4 10 == '+10 '; // 同上5 10 == '010'; // 同上 6 isNaN(null) =... 阅读全文

posted @ 2011-10-13 22:23 G.N&K 阅读(213) 评论(0) 推荐(0)

设置锚点()

摘要: 看到有的网页或博客做成了锚点的样式,感觉很不错。。自己实现了下。。<a href="#here">移动到Id叫here的标签处</a>.......<div id="here"><h2>我是here</h2></div> 阅读全文

posted @ 2011-10-13 21:35 G.N&K 阅读(208) 评论(0) 推荐(0)

网络开发中注释的应用之基础

摘要: 看到关于DOM节点的一文章http://www.cnblogs.com/sweting/archive/2009/12/06/1617839.htmlnodeName 属性含有某个节点的名称。元素节点的 nodeName 是标签名称属性节点的 nodeName 是属性名称文本节点的 nodeName 永远是 #text文档节点的 nodeName 永远是 #document有以下html的注释<!--testtext--><pid="p">sddd</p><!--testtext1-->js代码varb=document.bo 阅读全文

posted @ 2011-10-13 15:58 G.N&K 阅读(183) 评论(0) 推荐(0)

2011年10月12日 #

关于读《ajax后退解决方案(一)》笔记

摘要: 原文地址:http://www.cnblogs.com/snandy/archive/2011/09/18/2180102.html主要是解决后退按钮的问题。。因为IE6/7不支持hashchange事件(http://www.cnblogs.com/snandy/archive/2011/09/17/2179617.html)(这里讲了window.location.hash属性介绍),无法实现后退功能。所以有了四种解决方案。http://www.cnblogs.com/snandy/archive/2011/09/18/2180102.htmlhttp://www.cnblogs.com/ 阅读全文

posted @ 2011-10-12 23:59 G.N&K 阅读(207) 评论(0) 推荐(0)

按需加载js文件的形式(转)

摘要: //需要按需加载的内部文件列表映射mis.classFiles = { 'AjaxEvent': 'includes/ajax.lib.js', 'AjaxRequest': 'includes/request.lib.js', 'colorFade': 'includes/effects.lib.js'}//标记已经include的内部文件mis.includedFiles = {};//对内的文件加载mis.include = function(classname,callback){ if(m 阅读全文

posted @ 2011-10-12 15:33 G.N&K 阅读(312) 评论(0) 推荐(0)

属于attribute还是property。

摘要: 在获取比较值的时候会用in来判断是否可以用[x]方式,其实是判断该属性是属于attribute还是property。那attribute和property到底是什么呢,有什么区别呢?这个或许很多人都没留意,或许认为是同一个东西。要明确attribute和property是不同的东西就要先知道它们分别是什么,这个很难说得清,举些例子就明白了。这里我们先以ff为标准,后面再说ie的区别。以div为例,查查网页制作完全手册,会找到它有以下属性:ALIGNalignCLASSclassNameIDidTITLEtitle ......其中第一列就是attribute,第二列就是property。att 阅读全文

posted @ 2011-10-12 13:47 G.N&K 阅读(1087) 评论(0) 推荐(1)

2011年10月9日 #

关于undefined在函数中被重新赋值后的变化

摘要: var undefined = 123; function a(something, undefined) { alert(undefined);//123 } a('Hello World',42); var undefined = 123; (function(something, foo, undefined) { // 局部作用域里的 undefined 变量重新获得了 `undefined` 值 ... 阅读全文

posted @ 2011-10-09 23:05 G.N&K 阅读(859) 评论(0) 推荐(0)

javascript中变量的预解析

摘要: 先看一段程序var lastName = "Aut"; (function DisplayLastName() { console.log(lastName); var lastName = "Bru"; console.log(lastName); })();//谁能猜出结果是什么?感觉应该是AutBru但结果是 undefined Bru为什么呢??(function DisplayLastName() { var lastName;/* 或 var lastName(=undefined); (不这么写,是因为undefine... 阅读全文

posted @ 2011-10-09 22:44 G.N&K 阅读(219) 评论(0) 推荐(0)

理解call,this指针(用call实现继承),prototype模式实现继承的易错点

摘要: 今天看别人写的博客看到有人说js实现继承刻用call实现,自己寡闻就看了下function SuperType(name){ this.name=name; this.colors=["red","blue","green"]; } function SubType(){ SuperType.call(this); //继承了SuperType }一直不解。。知道自己写了个测试函数。。<script>function superType(name){ this.color="re"; this.name 阅读全文

posted @ 2011-10-09 14:57 G.N&K 阅读(404) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 下一页