web
文章平均质量分 50
czjuttsw
Learning, staying up to date, and working on the latest and greatest in languages and APIs is what keeps me excited.
展开
-
关于URL重写的实现
对于session,我想大多学JAVAEE的同学都很清楚。当一个客户请求一个页面时,服务器端会为该客户分配一个会话ID,然后在返回给客户的响应头中添加一个头部:Set-Cookie:JSESSIONID="32位长的16进制字符串"客户端保存该会话ID,在下一次请求中把该会话ID添加到请求头中,Cookie:JSESSIONID="32位长的16进制字符串"服务器取出该首部原创 2012-09-21 13:00:26 · 1591 阅读 · 0 评论 -
缩短URL长度
在人人上我们经常见到这样的URL: http://rrurl.cn/7suWNi 等。其实它只是缩短了的URL而已。jQuery URL shortener为我们提供了这样的插件:一个demo网址为:http://hayageek.com/examples/jquery/url-shortener/example.htmlgithub:https://github.com/hayag原创 2013-08-15 20:48:21 · 3788 阅读 · 0 评论 -
css之clear属性
clear属性用来设置元素左右两边是否可以存在浮动元素。它的值包括:left,right,both,none。其中none代表左右两边可以出现浮动元素。原创 2013-08-16 12:45:30 · 1391 阅读 · 0 评论 -
header导航菜单固定
最近开发的一个网站头部分为上下两块,上面是快捷入口部分,下面是导航菜单部分。现在的需求是当页面往下拉时,快捷入口部分被遮住,而导航菜单固定,而且处于window最上面。在StackOverflow网站上搜集过资料,并且参照网站http://ilikecss.com/web-design/examples/framework/20110928/的源代码,发现实现该功能的关键步骤有两点,第一点是需要创原创 2013-08-17 10:49:16 · 5772 阅读 · 1 评论 -
使li水平布局的两种方法
第一种:使用float:left。http://jsfiddle.net/tounaobun/DE596/第二种:使用display:inline。http://jsfiddle.net/tounaobun/DE596/1/原创 2013-08-16 23:01:37 · 2431 阅读 · 0 评论 -
检测浏览器名称,版本和操作系统
var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersi原创 2013-08-17 19:05:37 · 1143 阅读 · 0 评论 -
给网站添加favicon.ico
去网上在线生成一个favicon.ico图标,然后把下面的代码复制到页面的head里。...原创 2014-04-15 10:53:55 · 5597 阅读 · 0 评论