ITeye博客

odysseus 的唧唧歪歪

Odysseus_110 · 共 70 篇文章

struts 命名 bug

今天在魏总的帮忙下找到一个struts 的bug struts的 action里的 变量 不能用 大小写的class Class 命名, 例如不能叫lessonclass 或者 lessonClass public class ClassAction extends ActionSupport { private Lesson lesson;//这里不能用lessonclass 或者 lessonClass,反正就是在java里就别用class 这种关键词命名。 public String editClassType() { lesson.getSomething(); } public L…

2014-06-16 08:57 · Struts · 评论(0)

js notes

1 array and object definition let's introduce this bit of terminology: defining an array with [] is called array literal notation and defining an object using the curly braces {} is called object literal notation. 2 <a href="#"><a> 的 # 都去掉,用js $('a').css('cursor','pointer'); 控制让它成为 手的形状。 3 关于 jquer…

2014-06-14 09:26 · JS&HTML · 评论(0)

js 控制iframe 自适应高度

<iframe width="300" id="iframetestid" frameborder="0" scrolling="no" src="test.php" onload="setTimeout(function(){reSetIframe('iframetestid');},200);" ></iframe> function reSetIframe(iframeid){ var iframe = document.getElementById(iframeid); var height = 500; try{ var bHeight = iframe.contentWindow…

2014-06-13 17:30 · JS&HTML · 评论(0)

HTML的一些小积累

1. position:absolute 使用 position:absolute 的元素,如果它的父节点没有使用position:relative的话,它自己的绝对定位就是相对于整个文档的。 它的父节点使用position:relative 或者 position:fixed,那么他的绝对定位就是相对于它的父节点的。 2. 让所有字符大写: text-transform: uppercase; 3. 让字符有阴影效果: text-shadow: 2px 2px 0 #666; 4. 当一个父元素<div id="wrap">里面添加两个子元素,想要他们一个float:left, 一个flo…

2014-06-13 17:20 · JS&HTML · 评论(0)

js 中 在 拖动时 阻止 click事件

最近在做一个小应用时碰到一个需求是 鼠标可以拖动图片,然后在鼠标单击图片的时候可以放大图片。 这样就碰到一个问题,因为鼠标要实现拖放,鼠标首先是要单击图片然后才开始 拖放。所以拖放和放大功能就会重叠。 要解决这个问题,网上搜到一个解决方法是 设置一个全局变量。 因为拖放时 鼠标的 动作顺序是: a1 鼠标点击(mousedown), a2 鼠标移动(mousemove), a3 鼠标抬起(mouseup) 放大时 鼠标的 动作顺序是: b1 鼠标点击(mousedown), b2 鼠标抬起(mouseup) 所以 在实现 单击放大的时候 不用click事件, 而是用mouseup。 设置一个…

2012-08-01 16:14 · JQuery · 评论(0)

PHP, The difference between single and double quotes

Well first of all, single quotes are much more efficient than double quotes, which is shown in the results from a simple test, which you can find here: http://phpbar.isgreat.org/viewtopic.php?f=2&t=56 So, there obviously is a difference between them, but what is it? Simply put, single quotes are co…

2012-07-21 21:19 · PHP · 评论(0)

Gmail treat sub-domains as spam

今天测试给gmail发送邮件时候,开始总是被gmail列入到spam中, 后来找到他们的文档 http://support.google.com/mail/bin/answer.py?hl=en&answer=1366858 Phishing scams Some spammers send fraudulent messages that try to trick you into sharing personal information like passwords or credit card numbers. This practice is called phishing. Wha…

2012-05-13 16:52 · PHP · 评论(0)

iptv

iptv ** **市场概述 ** ** ** 据市场研究公司iSuppli 最新发表的研究报告称,2007 年,北美IPTV 用户达到了120 万,比2006 年增长了四倍。北美和南美的全部IPTV 用户在2007 年年底达到了180 万,增长率为257% 。 这篇报告称,IPTV 到目前为止还没有挖走北美卫星电视提供商的用户,因为这个地区的IPTV 用户主要是在付费电视市场。这篇报告称,2007 年北美和南美的卫星电视用户数量从2006 年的363 万增长到了395 万。 美国的AT&T 公司的U-Verse 服务在2007 年年底拥有23.1 万北美的IPTV 用户。Verizon 公…

2011-06-11 00:43 · IPTV · 评论(0)

javascript 模态窗口

用jQuery Impromptu调试个模态窗口调到最后ie6居然不能用,真是好看不中用,还是山寨好: <!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> <title>网页中弹出小窗口,页面背景逐渐变为半透明</title> <style> html,body{font-size:12px;margi…

2011-02-13 18:10 · JS&HTML · 评论(0)

struts 标签的定义

<html:text styleId="sysconfig_form_exgrate" property="exchangeRate" size="6" maxlength="6"/> styleId 最后就是id 在js中document.getElementById();的参数。

2011-02-13 18:05 · Struts · 评论(0)

javascript 权威指南 学习笔记3:javascript 作用域

var testvar = 'window属性'; var o3 = { testvar:'3', testvar2:'3**', fun:function(){ alert('o3: '+this.testvar);//'obj3' var inner = function(){ alert('o3-inner: '+this.testvar);//'window属性' alert('o3-inner: '+this.testvar2);//undefined(未定义) }; inner(); } }; o3.fun(); 调用函数时,你可以把 this 想象为每个函数内的一个特殊(躲起来…

2011-02-13 18:00 · JS&HTML · 评论(0)

javascript 权威指南 学习笔记1

If you attempt to read the value of an undeclared variable, JavaScript will generate an error. If you assign a value to a variable that you have not declared with var , JavaScript will implicitly declare that variable for you. Note, however, that implicitly declared variables are always created as …

2011-02-05 23:32 · JS&HTML · 评论(0)

javascript 权威指南 学习笔记2: Comparison Operators

Comparison Operators The most commonly used types of relational operators are the comparison operators, which are used to determine the relative order of two values. The comparison operators are: Less than (< ) The < operator evaluates to true if its first operand is less than its second operand; o…

2011-02-05 23:31 · JS&HTML · 评论(0)

php读取文件

1。php存文件的时候$testfilename2居然是非要单引号才行,要不然用双引号会报错,以后用变量的时候应该多用单引号 $testfilename2='D:\ProgramFiles2\AppServ\www\catch28\admin\testmethod6.html';//文件名,可以为.php或者.txt等文本文件 file_put_contents($testfilename,'<!--resultpage-->'); 2。mysql_free_result() 在update的操作的时候不需要调用: mysql_free_result (PHP 4, PHP 5) mysql…

2011-02-05 23:26 · PHP · 评论(0)

solaris 字符串对比

http://bugzilla.globus.org/globus/show_bug.cgi?id=4929 solaris 和 HPUX 上的== 号不好使 solaris and HPUX: if [ "$findstr" = "31" -a "$PLATFORM" = "OS/390" ];then 其它linux: if [ "$findstr" == "31" -a "$PLATFORM" == "OS/390" ];then 大公司的争执真是苦了广大程序员民工,到最后还是被oracle收购,杯具。

2011-02-05 23:25 · Linux · 评论(0)