下一站天后

今朝的容颜老于昨晚

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  js

摘要:得到一段json数据格式,但是字符串,想利用对象打点的方式得到其中的属性。这便让人想到反射。 粗略理解:将字符串以程序本身的意思去表达。这就是反射,通过这个例子牢牢的把反射学到。起码知道有他,下次在有这样功能的时候就知道怎么去找解决方法。在设计模式中,大量的用到反射! jrjIndexData[i].region 是msg里面的数据,eval(msg);反射该字符串msg 网上定义:反射机制指的... 阅读全文
posted @ 2009-04-29 15:31 孙雅玲 阅读(675) 评论(1) 推荐(0)

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> New Document 阅读全文
posted @ 2009-04-27 10:37 孙雅玲 阅读(272) 评论(1) 推荐(0)

摘要:什么是JSON?JSON 即 JavaScript Object Natation,它是一种轻量级的数据交换格式,非常适合于服务器与 JavaScript 的交互,比xml更轻量级。json本身利用了js中面向对象的形式。对象可以打点访问。 用途:原来写ajax,要从服务器后台得到返回值,如果利用ajax.dll可以返回一个dt; 但用jquery不能得到一个dt,要想得到dt里的数据就拼接字符串... 阅读全文
posted @ 2009-03-16 16:24 孙雅玲 阅读(311) 评论(0) 推荐(0)

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 阅读全文
posted @ 2009-03-11 17:36 孙雅玲 阅读(407) 评论(0) 推荐(0)

摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 阅读全文
posted @ 2009-02-26 18:01 孙雅玲 阅读(233) 评论(0) 推荐(0)

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 阅读全文
posted @ 2009-02-19 15:22 孙雅玲 阅读(175) 评论(0) 推荐(0)

摘要:this.RegisterStartupScript("show",""); 阅读全文
posted @ 2009-02-17 11:59 孙雅玲 阅读(1735) 评论(2) 推荐(0)

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 区别:setTimeout("function",time);//设置一个超时对象,只执行一次,无周期 setInterval("function"... 阅读全文
posted @ 2009-02-05 17:23 孙雅玲 阅读(645) 评论(1) 推荐(0)

摘要:function GetQueryString(name) { var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r!=null) return unescape(r[2]); return null; } 阅读全文
posted @ 2009-02-05 16:56 孙雅玲 阅读(921) 评论(1) 推荐(0)

摘要:html 限制输入 数字 input,txtbox均可用 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->宾客年龄: * js 限制输入不为空 Code highlighting produced by Actipro Cod... 阅读全文
posted @ 2008-12-07 19:49 孙雅玲 阅读(399) 评论(0) 推荐(0)

摘要:直接在后台写js填充textarea,【document.getElementById('QMemo').value='"+sca.Question+"';】 RegisterStartupScript在前输出脚本 Page.RegisterStartupScript("fillTextbox",""); 阅读全文
posted @ 2008-11-12 14:47 孙雅玲 阅读(867) 评论(1) 推荐(0)

摘要:实现首尾相连的Marquee效果,并且在开始时完整显示内容。而不是从左边渐渐移动出来 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 模拟Marquee实现首尾想连的移动效果 ... 阅读全文
posted @ 2008-10-08 09:57 孙雅玲 阅读(577) 评论(1) 推荐(0)

摘要:js:window.location.href放在=左边得到当前页面地址,放在右边则为转向。 c#:string url = Request.RawUrl.ToLower();//得到当前页面的url 阅读全文
posted @ 2008-09-26 17:02 孙雅玲 阅读(578) 评论(1) 推荐(0)

摘要:29. 获得一个窗口的大小 document.body.clientWidth; document.body.clientHeight 30. 怎么判断是否是字符 if (/[^/x00-/xff]/g.test(s)) alert("含有汉字"); else alert("全是字符"); 阅读全文
posted @ 2008-09-14 17:27 孙雅玲 阅读(201) 评论(0) 推荐(0)