如何防止空链接,跳转到网页顶端
摘要:解决办法:普通的链接像<a href="http://www.example.com">asdf</a>这样的不会跳到顶端的,但空链接<a href="#">这样的,点击后会跳到页面顶端。方法一:把它改为<a href="javascript:void(0)">就可以了。方法二:回三个#号。即<a href="###">即可。
阅读全文
posted @
2013-05-21 18:59
yun007
阅读(451)
推荐(0)
表格划过变色之tr:hover无效,td:hover有效解决方法
摘要:首先IE6不支持非A标签的伪类,这里不考虑IE6,,html代码如下:<table width="16%" border="0" cellpadding="1" cellspacing="0"> <tr> <th bgcolor="#009900" > </th> <th bgcolor="#009900" > </th> </tr> <tr>
阅读全文
posted @
2013-05-20 11:06
yun007
阅读(8966)
推荐(0)
windows nmake C++面向对象实例
摘要:1、程序源文件:如有三个文件:主文件:hello.cpp,类NUM的说明和实现文件:Num.h和Num.cpp,内容如下:main.cpp:#include "iostream"#include "NUM.h"using namespace std;int main(){cout<<"Hello world"<<endl;NUM a;a.Add(1);a.Add(3);a.Add(5);a.Display();return 0;}NUM.cpp:#include "iostream"#inc
阅读全文
posted @
2013-05-17 21:23
yun007
阅读(330)
推荐(0)
好网站样式
摘要:新浪数据http://data.weibo.com/index/industry新浪查询http://data.weibo.com/index/hotword?wid=13PzIqQPl微博数据http://data.weibo.com/index北大可视化工具,百度搜- 北大 微博http://vis.pku.edu.cn/weibova/weiboevents/easy-ui 权限http://sypro.cloudfoundry.com/
阅读全文
posted @
2013-05-17 18:33
yun007
阅读(259)
推荐(0)
CSS 表格样式
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-
阅读全文
posted @
2013-05-17 17:39
yun007
阅读(300)
推荐(0)
JS绝对定位到右下角
摘要:1 <div id="msgBox">2 <div id="msgTitle">最新消息</div>3 <div id="msgContent"><a href="#">这里是内容页面</a></div>4 </div><style> #msgBox{width:150px;border:1px solid silver;background:#C83030; position:fixed;right:0px
阅读全文
posted @
2013-05-16 21:11
yun007
阅读(629)
推荐(0)
error LNK2019: 无法解析的外部符号(编程解决方法)
摘要:正在编译...1>Ipv4IPv6traceroutesrc.cpp1>d:\研究生\c++\study\test\test\ipv4ipv6traceroutesrc.cpp(461) : warning C4267: “参数”: 从“size_t”转换到“DWORD”,可能丢失数据1>d:\研究生\c++\study\test\test\ipv4ipv6traceroutesrc.cpp(1131) : warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据1>d:\研究生\c++\study\test\test\ipv4ipv6
阅读全文
posted @
2013-05-15 21:28
yun007
阅读(2281)
推荐(0)
JQuery class选择器
摘要:var containID = $(".tree.treeFolder")<ul class="tree treeFolder"></ul>
阅读全文
posted @
2013-05-15 14:38
yun007
阅读(150)
推荐(0)
js-replace
摘要:正确用法"pages/user/user.html".replaceAll('/','e');"pageseusereuser.html""pages/user/user.html".replaceAll('/','_');"pages_user_user.html"错误用法"pages/user/user.html".replaceAll('//','_'); xxconsole.log(title
阅读全文
posted @
2013-05-15 14:12
yun007
阅读(134)
推荐(0)
网页中嵌入微博Iframe
摘要:<div style="width:230px;position: absolute;top:60px;right:0" layoutH="80"> <iframe width="100%" height="430" class="share_self" frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?width=0&
阅读全文
posted @
2013-05-15 10:18
yun007
阅读(1487)
推荐(0)
css万能清除浮动
摘要:<style>.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}*html .clearfix{height:1%;}*+html .clearfix{height:1%;}.clearfix{display:inline-block;}.clearfix {display:block;}</style>
阅读全文
posted @
2013-05-14 15:49
yun007
阅读(276)
推荐(0)
JS判断浏览器IE8或者IE9
摘要:<head><!--[if lte IE 8]><script src="r2d3.js"></script><![endif]--> <!--[if gte IE 9]><!--> <script src="d3.v3.min.js"></script> <!--<![endif]--></head>
阅读全文
posted @
2013-05-13 16:31
yun007
阅读(803)
推荐(0)
java 环境变量设置
摘要:1.打开我的电脑--属性--高级--环境变量 2.新建系统变量JAVA_HOME 和CLASSPATH 变量名:JAVA_HOME 变量值:C:\Program Files\Java\jdk1.7.0变量名:CLASSPATH 变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;3. 选择“系统变量”中变量名为“Path”的环境变量,双击该变量,把JDK安装路径中bin目录的绝对路径,添加到Path变量的值中,并使用半角的分号和已有的路径进行分隔。 变量名:Path 变量值:%JAVA_HOME%\bin;%JAVA_HOME%\jre
阅读全文
posted @
2013-05-13 10:05
yun007
阅读(197)
推荐(0)
eclipse-svn
摘要:1、查看eclipse版本号在eclipse按照目录有一个.eclipseversion文件,打开查看即可2、选择对应版本的svn下载eclipse-help-install new software 安装新软件输入svnhttp://subclipse.tigris.org/update_1.6.xok,即可选择下载安装3、使用svn方法一、窗口->打开透视图->SVN资源库研究->右键->新建->资源库位置->URL中输入svn://127.0.0.1/->输入2.7定义的用户名test和密码password方法二、4.提交工程 4.1右击工程-&
阅读全文
posted @
2013-05-13 10:04
yun007
阅读(342)
推荐(0)
thinkPHP时间戳格式化
摘要:如果在Action里就按照正常函数来写 $time = date("Y-m-d", $time);如果在模板里 就这样 {$time|date='Y-m-d',###} 看模板手册
阅读全文
posted @
2013-05-11 16:15
yun007
阅读(954)
推荐(0)
ThinkPHP写后台管理程序时如何合适合理地对Session进行验证
摘要:初学ThinkPHP,写到后台管理页面的时候,遇到Session判断的问题,由于Session必须对每个页面进行检查,以前验证Session只是单纯地写一个 session.inc.php 文件,然后每个页都对其进行包含,而ThinkPHP是完全面向对象的框架,无法按照以前的方式进行判断,如果在每个对象方法中都调用Session判断函数又比较麻烦,唯一可靠的解决办法只有用构造函数:首先登录页由于不用判断Session,所以登录页用单独的一个Action写,把需要判断Session的页面用另外一个独立的一个Action写(注意一定要全是需要判断Session的页面),下面我贴一下代码,希望对大家
阅读全文
posted @
2013-05-11 14:24
yun007
阅读(656)
推荐(0)
ThinkPHP add、save无法添加、修改不起作用
摘要:ThinkPHPadd、save无法添加、修改不起作用案例:数据库新添加一字段,修改值不成功。解决方案:将Runtime/Data/_fields/下面的字段缓存删除,或者直接删除整个Runtime文件也是可以的分析:由于Thinkphp,采用字段缓存机制,一般情况下会将数据库的字段缓存到文件中,当我们对数据库里的字段增加,修改之后,缓存文件没有变化,所以,我们在Add或者Save的时候,不起作用。
阅读全文
posted @
2013-05-10 10:38
yun007
阅读(326)
推荐(0)