摘要:得到一段json数据格式,但是字符串,想利用对象打点的方式得到其中的属性。这便让人想到反射。 粗略理解:将字符串以程序本身的意思去表达。这就是反射,通过这个例子牢牢的把反射学到。起码知道有他,下次在有这样功能的时候就知道怎么去找解决方法。在设计模式中,大量的用到反射! jrjIndexData[i].region 是msg里面的数据,eval(msg);反射该字符串msg 网上定义:反射机制指的...
阅读全文
随笔分类 - js
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> New Document
阅读全文
摘要:什么是JSON?JSON 即 JavaScript Object Natation,它是一种轻量级的数据交换格式,非常适合于服务器与 JavaScript 的交互,比xml更轻量级。json本身利用了js中面向对象的形式。对象可以打点访问。 用途:原来写ajax,要从服务器后台得到返回值,如果利用ajax.dll可以返回一个dt; 但用jquery不能得到一个dt,要想得到dt里的数据就拼接字符串...
阅读全文
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
阅读全文
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
阅读全文
摘要:this.RegisterStartupScript("show","");
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 区别:setTimeout("function",time);//设置一个超时对象,只执行一次,无周期 setInterval("function"...
阅读全文
摘要: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;
}
阅读全文
摘要:html 限制输入 数字 input,txtbox均可用 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->宾客年龄: * js 限制输入不为空 Code highlighting produced by Actipro Cod...
阅读全文
摘要:直接在后台写js填充textarea,【document.getElementById('QMemo').value='"+sca.Question+"';】
RegisterStartupScript在前输出脚本
Page.RegisterStartupScript("fillTextbox","");
阅读全文
摘要:实现首尾相连的Marquee效果,并且在开始时完整显示内容。而不是从左边渐渐移动出来 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 模拟Marquee实现首尾想连的移动效果 ...
阅读全文
摘要:js:window.location.href放在=左边得到当前页面地址,放在右边则为转向。
c#:string url = Request.RawUrl.ToLower();//得到当前页面的url
阅读全文
摘要:29. 获得一个窗口的大小
document.body.clientWidth; document.body.clientHeight
30. 怎么判断是否是字符
if (/[^/x00-/xff]/g.test(s)) alert("含有汉字");
else alert("全是字符");
阅读全文

浙公网安备 33010602011771号