博客园  :: 首页  :: 新随笔  :: 订阅 订阅  :: 管理
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 32 下一页

2011年12月26日

摘要: 测试css下图片是何时加载的。测试结论以下样式图片在页面加载时就加载内嵌样式<div style="background-image:url(image.aspx?from=page);">内嵌样式表.divCur{background-image:url(image.aspx?from=style1);}当 存在两个.divCur{background-image:url(image.aspx?from=style1);} .divCur{background-image:url(image.aspx?from=style2);}则只第二个图片会被加载外部样式 阅读全文

posted @ 2011-12-26 13:13 PHP-张工 阅读(2918) 评论(0) 推荐(0) 编辑

摘要: 数据来源CSDN泄漏的数据库分析SQLselect top 100 password,count(1) as num, cast(count(1)*100.0/6428632 as decimal(10,2)) from dbo.csdnnet group by password order by num desc结果 (数据统计截至2009年 共6428632条数据)注意:CSDN要求密码至少8位。密码数量百分比1234567892350293.66 %123456782127613.31 %11111111763491.19 %dearbook460540.72 %000000003495 阅读全文

posted @ 2011-12-26 10:20 PHP-张工 阅读(1543) 评论(0) 推荐(1) 编辑

摘要: CSDN的数据库泄漏简直成了程序员们的盛宴。数据安全值得深思。借用网上的数据库刚好分析下,大家都在用什么Email分析SQLselect top 100 substring(Email, Charindex('@', Email), 20) as e, count(1) as num, cast(count(1)*100.0/6428632 as decimal(10,2)) from dbo.csdnnet group by substring(Email, Charindex('@', Email), 20) order by num desc结果(数据统计 阅读全文

posted @ 2011-12-26 09:36 PHP-张工 阅读(869) 评论(1) 推荐(0) 编辑

2011年12月21日

摘要: 参考资料:http://www.cnblogs.com/jeffhsu/archive/2011/08/24/2152013.html看了jeffhsu的方法挺好的,但需要做一个Excel模版,参考网上资料改进了一下。//Asp.net 导出EXCELprivate void ExportExcel(){ //临时文件 string tempFile = string.Format("{0}/{1}.xls", System.Environment.GetEnvironmentVariable("TEMP"), Guid.NewGuid()); //使用 阅读全文

posted @ 2011-12-21 15:31 PHP-张工 阅读(890) 评论(1) 推荐(1) 编辑

2011年12月19日

摘要: 原理利用CSS特性 #msgBody div{},当有ID为msgBody存在时才生效来实现。兼容性兼容IE7+、Chrome、火狐IE6下Select元素总在最上层。并且不支持fix所以只能绝对定位。弹出层是会跳转到顶部。IE6下修改body的ID后display:block; 显示有问题(有一部分显示),在IE6下时,使用left:-10000px;来实现隐藏。JS中调用方法弹出方法:document.body.id = 'msgBody';隐藏方法:document.body.id = '';Chrome下测试效果实例下载:http://files.cnb 阅读全文

posted @ 2011-12-19 16:25 PHP-张工 阅读(8835) 评论(1) 推荐(2) 编辑

2011年12月12日

摘要: 测试的网页结构如下:<!DOCTYPE html><html><head> <title>标题</title></head><body onclick="alert(1);"><div>aaaaaaa</div></body></html>打开网页后,点击空白处并不会触发body的onclick事件。只有点击有文字的那一行才会触发。说明body没有充满网页。但奇怪的是IE、Chrome如上面所说。而火狐点击空白处会触发onclick事件。为了看 阅读全文

posted @ 2011-12-12 16:59 PHP-张工 阅读(1158) 评论(0) 推荐(2) 编辑

摘要: 使用连接执行JS的方法如下:使用href="javascript:alert(1);" 执行<a href="javascript:alert(1);">test</a>使用onclick="alert(1)" 执行<a href="#" onclick="alert(1);">test</a>事件绑定执行<a id="a1" href="#">test</a><script&g 阅读全文

posted @ 2011-12-12 16:31 PHP-张工 阅读(19450) 评论(0) 推荐(1) 编辑

摘要: <input />在浏览器中会解析成什么呢?经过测试会解析成文本输入框。使用JS获取type属性也是text。(IE、火狐、Chrome)但发现如果使用如下样式:input[type="text"]{color:red;}只在IE下有效。(未测试IE9) 阅读全文

posted @ 2011-12-12 16:05 PHP-张工 阅读(228) 评论(0) 推荐(0) 编辑

2011年12月8日

摘要: 只看本页的所有图片javascript:var h='',o=document.images,i=0;while(o[i]){h+=o[i++].outerHTML;}document.write(h);只看本页高度大于100的图片javascript:var h='',o=document.images,i=0;while(o[i]){if(o[i].offsetHeight>100)h+=o[i].outerHTML;i++;}document.write(h);只看内容长度大于100的内容 (屏蔽非必要内容)javascript:var o=docu 阅读全文

posted @ 2011-12-08 14:08 PHP-张工 阅读(351) 评论(0) 推荐(0) 编辑

2011年12月7日

摘要: 通常为了兼容多个浏览器,一般都要是用css hack。#test{ color:red; /* 所有浏览器都支持 */ color:red !important;/* Firefox、IE7支持 */ _color:red; /* IE6支持 */ *color:red; /* IE6、IE7支持 */ *+color:red; /* IE7支持 */ color:red\9; /* IE6、IE7、IE8支持 */ color:red\0; /* IE8支持 */}今天看 www.laiwang.com 时,发现他的HTML 的class属性中包含了如下信息。ua-webkit... 阅读全文

posted @ 2011-12-07 17:39 PHP-张工 阅读(1096) 评论(0) 推荐(1) 编辑

上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 32 下一页