两种服务端向客户端静态页写数据的方式
摘要:如果能在静态页中通过javascript加载一些动态数据,对这些数据做些缓存,相信会对页面访问速度有很大提高。我这里试了两种方式,不知道大家还有没有更好的方式,欢迎指教。方式一:数据放入服务器显示文本控件,更改控件文本输出方式我这里用的<asp:Literalrunat="server"ID="ltlContent"></asp:Literal>拼接显示内容foreach(DataRowdrinds.Tables[0].Rows){stringleaveWordContent=(string)dr["QuestionCo
阅读全文
【转】一些不错的javascript 精简技巧 part1
摘要:摘了过来,英文不好的上有道词典吧,也许代码是程序员最好的沟通工具While some folk will argue that verbose code aids readability, I think almost the opposite, and in this post I’m going to list some basic tips for minimising redundant clutter in your code. JavaScript is a fun language at its core — it’s worth learning the tiny detail
阅读全文
静态页中利用javascript 加载服务内容,输出时换行问题
摘要:静态页中利用javascript 加载服务内容,输出时换行问题cacheContent+=string.Format("document.write(\"<li><atarget='_blank'href='../LeaveWord/ShowLeaveWord.aspx?ID={0}'title='{1}'>{2}</a></li>\");\r\n",(int)dr["ID"],leaveWordContent,(leaveWordCont
阅读全文