<?xml version="1.0" encoding="UTF-8"?>
  <feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html"><![CDATA[WEB交互设计]]></title>
  <subtitle type="html"><![CDATA[-  关注WEB应用开发技术 - 互联网信息 - 软件工程 - www.xyhot.com]]></subtitle>
  <id>http://www.xyhot.com/</id> 
  <link rel="alternate" type="text/html" href="http://www.xyhot.com/" /> 
  <link rel="self" type="application/atom+xml" href="http://www.xyhot.com/atom.asp" /> 
  <generator uri="http://www.pjhome.net/" version="2.4.1022">PJBlog2</generator> 
  <updated>2010-01-25T18:35:07+08:00</updated> 

  <entry>
	  <title type="html"><![CDATA[压缩JS代码的好助手]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=5" label="HTML/JS/CSS" /> 
	  <updated>2010-01-25T18:35:07+08:00</updated>
	  <published>2010-01-25T18:35:07+08:00</published>
		  <summary type="html"><![CDATA[<div class="UBBPanel"><div class="UBBTitle"><img src="http://www.xyhot.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp33982">
<html>
<head>
<title>JS Minifier</title>
<script type=&#34;text/javascript&#34;>
String.prototype.has=function(c){return this.indexOf(c)>-1;};function jsmin(comment,input,level){if(input===undefined){input=comment;comment='';level=2;}else if(level===undefined||level<1||level>3){level=2;}if(comment.length>0){comment+='\n';}var a='',b='',EOF=-1,LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',DIGITS='0123456789',ALNUM=LETTERS+DIGITS+'_$\\',theLookahead=EOF;function isAlphanum(c){return c!=EOF&amp;&amp;(ALNUM.has(c)||c.charCodeAt(0)>126);}function get(){var c=theLookahead;if(get.i==get.l){return EOF;}theLookahead=EOF;if(c==EOF){c=input.charAt(get.i);++get.i;}if(c>=' '||c=='\n'){return c;}if(c=='\r'){return'\n';}return' ';}get.i=0;get.l=input.length;function peek(){theLookahead=get();return theLookahead;}function next(){var c=get();if(c=='/'){switch(peek()){case'/':for(;;){c=get();if(c<='\n'){return c;}}break;case'*':get();for(;;){switch(get()){case'*':if(peek()=='/'){get();return' ';}break;case EOF:throw'Error: Unterminated comment.';}}break;default:return c;}}return c;}function action(d){var r=[];if(d==1){r.push(a);}if(d<3){a=b;if(a=='\''||a=='&#34;'){for(;;){r.push(a);a=get();if(a==b){break;}if(a<='\n'){throw'Error: unterminated string literal: '+a;}if(a=='\\'){r.push(a);a=get();}}}}b=next();if(b=='/'&amp;&amp;'(,=:[!&amp;|'.has(a)){r.push(a);r.push(b);for(;;){a=get();if(a=='/'){break;}else if(a=='\\'){r.push(a);a=get();}else if(a<='\n'){throw'Error: unterminated Regular Expression literal';}r.push(a);}b=next();}return r.join('');}function m(){var r=[];a='\n';r.push(action(3));while(a!=EOF){switch(a){case' ':if(isAlphanum(b)){r.push(action(1));}else{r.push(action(2));}break;case'\n':switch(b){case'{':case'[':case'(':case'+':case'-':r.push(action(1));break;case' ':r.push(action(3));break;default:if(isAlphanum(b)){r.push(action(1));}else{if(level==1&amp;&amp;b!='\n'){r.push(action(1));}else{r.push(action(2));}}}break;default:switch(b){case' ':if(isAlphanum(a)){r.push(action(1));break;}r.push(action(3));break;case'\n':if(level==1&amp;&amp;a!='\n'){r.push(action(1));}else{switch(a){case'}':case']':case')':case'+':case'-':case'&#34;':case'\'':if(level==3){r.push(action(3));}else{r.push(action(1));}break;default:if(isAlphanum(a)){r.push(action(1));}else{r.push(action(3));}}}break;default:r.push(action(1));break;}}}return r.join('');}jsmin.oldSize=input.length;ret=m(input);jsmin.newSize=ret.length;return comment+ret;}
function $(i) {return document.getElementById(i);}
function go() {
			$('output').value = jsmin($('comment').value, $('input').value, $('level').value);
			$('outputtitle').style.display = $('output').style.display = $('statstitle').style.display = $('stats').style.display = 'block';
			$('oldsize').value = jsmin.oldSize;
			$('newsize').value = jsmin.newSize;
			$('ratio').value = (Math.round(jsmin.newSize / jsmin.oldSize * 1000) / 10) + '%';
		}
		function bw() {
			$('comment').value = $('input').value = $('output').value = '';
			$('outputtitle').style.display = $('output').style.display = $('statstitle').style.display = $('stats').style.display = 'none';
}
</script>
<style type=&#34;text/css&#34;>
#comment { width:95%; height:4em; }
#input { width:95%; height:10em; }
#go { font-weight:bold; }
#outputtitle, #statstitle, #stats { display:none; }
#oldsize, #newsize, #ratio { text-align:right; width:4em; }
#output { width:95%; height:10em;display:none; }
h2 { margin-bottom:0; }
</style>
</head>
<body bgcolor=&#34;linen&#34;>
	<h1>JS Minifier</h1>
	<p>By Franck Marcia, 
	From the <a href=&#34;<a href="http://javascri&#112;t.crockford.com/jsmin.html" target="_blank">http://javascri&#112;t.crockford.com/jsmin.html</a>&#34; target=&#34;_blank&#34;>original idea</a> of <a href=&#34;<a href="http://www.crockford.com/" target="_blank">http://www.crockford.com/</a>&#34; target=&#34;_blank&#34;>Douglas Crockford</a>, 
	Last modified: 2006/08/31</p>
	<hr/>
	<h2>Comments</h2>
	<textarea id=&#34;comment&#34; name=&#34;comment&#34;><&#47textarea>
	<h2>Code</h2>
	<textarea id=&#34;input&#34; name=&#34;input&#34;><&#47textarea>
	


	<center>
		Level:&amp;nbsp;
		<sel&#101;ct id=&#34;level&#34;>
			<option value=&#34;1&#34;>minimal</option>
			<option value=&#34;2&#34; sel&#101;cted=&#34;sel&#101;cted&#34;>conservative</option>
			<option value=&#34;3&#34;>agressive</option>
		</sel&#101;ct>
		&amp;nbsp;&amp;nbsp;
		<input id=&#34;go&#34; type=&#34;submit&#34; value=&#34;JSMin&#34; onclick=&#34;go();return false;&#34;/>
		&amp;nbsp;&amp;nbsp;
		<input type=&#34;submit&#34; value=&#34;Clear&#34; onclick=&#34;bw();return false;&#34;/>


		<small><b>Minimal</b>: o&#114;iginal algorithm but keep linefeeds if single - <b>Conservative</b>: o&#114;iginal algorithm - <b>Agressive</b>: remove more linefeed than the o&#114;iginal algorithm but can be regressive</small>
	</center>
	<h2 id=&#34;outputtitle&#34;>Output</h2>
	<textarea id=&#34;output&#34; name=&#34;output&#34;><&#47textarea>
	<h2 id=&#34;statstitle&#34;>Stats</h2>
	<div id=&#34;stats&#34;>Old size: <input id=&#34;oldsize&#34;></span> New size: <input id=&#34;newsize&#34;></span> Ratio: <input id=&#34;ratio&#34;></span></div>
</body>
</html>
</TEXTAREA><br/><INPUT onclick="runEx('temp33982')"  type="button" value="运行此代码"/> <INPUT onclick="doCopy('temp33982')"  type="button" value="复制此代码"/><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=469" /> 
	  <id>http://www.xyhot.com/default.asp?id=469</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[Cognos8.3 Content Manager配置SQLServer2005 连接出错]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=23" label="DW/BI" /> 
	  <updated>2009-12-30T16:40:17+08:00</updated>
	  <published>2009-12-30T16:40:17+08:00</published>
		  <summary type="html"><![CDATA[之前用SQLServer2000作为Cognos8.3&nbsp;运行库,连接很正常.最近由于换成SQLServer2005,测试连接出错:<br/><img src="http://www.xyhot.com/attachments/month_0912/020091230163620.jpg" border="0" alt=""/><br/>原来SQLServer2005默认禁用TCP/IP协议:<br/><img src="http://www.xyhot.com/attachments/month_0912/q20091230163841.jpg" border="0" alt=""/><br/>只需将协议启用就可以了,不过一定要重启SQL&nbsp;Server服务哦<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=468" /> 
	  <id>http://www.xyhot.com/default.asp?id=468</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[JS]左右方向无缝滚动]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=5" label="HTML/JS/CSS" /> 
	  <updated>2009-12-29T09:38:49+08:00</updated>
	  <published>2009-12-29T09:38:49+08:00</published>
		  <summary type="html"><![CDATA[<textarea name="code" class="jscript">
<!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; 
	&#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>&#34;>
<html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34; xml:lang=&#34;zh-cn&#34; lang=&#34;zh-cn&#34;>
<head>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; />
<meta http-equiv=&#34;Content-Language&#34; content=&#34;zh-cn&#34; />
<title>来自web developer navigator!的dhScroll Ver2.0.0 左右横向无缝滚动</title>
<style type=&#34;text/css&#34;>
/*块1样式*/
#scroll {width:600px;height:250px;overflow:hidden;}
/*块2样式*/
.mqdemoa {width:6000px!important;width:3000px;margin:0;padding:0;}
/*块2子元素样式*/
.mqdemoa li {width:148px;margin:0 1px;height:250px;background:red;
float:left;list-style:none;}

/*其他样式，与scroll对象无关联*/
#prenext {width:600px;height:20px;overflow:hidden;}
#prenext span {display:block;font:12px &#34;宋体&#34;;width:50%;height:20px;line-height:20px;text-align:center;cursor:pointer;color:#fff;background:#000;}
#prenext .pre {float:left;}
#prenext .next {float:right;}
</style>
<script type=&#34;text/javascript&#34;>
function dhscroll(){
	//author:dh20156
	var dh = this;
	this.autoid = null;
	//块1
	this.scrollDOM = null;
	//块2
	this.scrollCDOM = null;
	//展示宽度（和块1宽度一致）
	this.showwidth = 0;
	//每次滚动长度，这个值要能被this.showwidth整除才行
	this.steplength = 20;
	var oldlength = this.steplength;
	//滚动时间间隔
	this.steptime = 1;
	//停顿时间
	this.resttime = 3000;
	//滚动长度
	this.uvwidth = 0;

	//无缝设置过程
	this.getsw = function(){
		var tempw = this.scrollCDOM.offsetWidth;
		var temps = this.scrollCDOM.innerHTML;
		this.scrollCDOM.innerHTML = [temps,temps].join(&#34;&#34;);
		this.scrollCDOM.style.width = tempw*2+&#34;px&#34;;
		if(document.attachEvent){
			this.scrollDOM.attachEvent(&#34;onmouseover&#34;,dh.pause);
			this.scrollDOM.attachEvent(&#34;onmouseout&#34;,dh.goon);
		}else{
			this.scrollDOM.addEventListener(&#34;mouseover&#34;,dh.pause,true);
			this.scrollDOM.addEventListener(&#34;mouseout&#34;,
dh.goon,true);
		}
		this.uvwidth = Math.ceil(this.scrollDOM.scrollWidth / 2);
	}

	//从右到左
	this.scrollleft = function(){
		if(this.autoid!=null){
			window.clearTimeout(this.autoid);
		}
		var uvleft = this.scrollDOM.scrollLeft;
		uvleft += this.steplength;

		this.scrollDOM.scrollLeft = uvleft;

		if(uvleft>=this.uvwidth){
			this.scrollDOM.scrollLeft = 0;
		}
		
		if(uvleft % this.showwidth == 0){
			if(this.autostart){this.autoid = 
window.setTimeout(function(){dh.scrollleft()},dh.resttime);}
		}else{
			this.autoid = window.setTimeout(function(){
dh.scrollleft()},dh.steptime);
		}
		document.getElementById(&#34;s&#34;).innerHTML = 
this.uvwidth+&#34;,&#34;+uvleft;
	}

	//从左到右
	this.scrollright = function(){
		if(this.autoid!=null){
			window.clearTimeout(this.autoid);
		}
		var uvleft = this.scrollDOM.scrollLeft;
		uvleft -= this.steplength;

		this.scrollDOM.scrollLeft = uvleft;

		if(uvleft <= 0){
			this.scrollDOM.scrollLeft = this.uvwidth;
		}

		if(uvleft % this.showwidth == 0){
			if(this.autostart){this.autoid = 
window.setTimeout(function(){dh.scrollright()},dh.resttime);}
		}else{
			this.autoid = window.setTimeout(function(){
dh.scrollright()},dh.steptime);
		}
		document.getElementById(&#34;s&#34;).innerHTML = 
this.uvwidth+&#34;,&#34;+uvleft;
	}

	//开始滚动，参数为方向，首屏是否停顿
	this.go = function(direction,rest){
		this.autostart = true;
		if(this.autoid!=null){
			window.clearTimeout(this.autoid);
		}
		if(direction==&#34;left&#34;){
			if(rest){
				this.autoid = window.setTimeout(function(){dh.scrollleft()},5000);
			}else{
				dh.scrollleft();
			}
		}else{
			if(rest){
				this.autoid = window.setTimeout(function(){dh.scrollright()},5000);
			}else{
				dh.scrollright();
			}
		}
	}

	//往右
	this.pre = function(){
			this.scrollright();
	}
	//往左
	this.next = function(){
			this.scrollleft();
	}
	//暂停
	this.pause = function(){
		dh.oldlength = dh.steplength;
		dh.steplength = 0;
	}
	//继续
	this.goon = function(){
		dh.steplength = dh.oldlength;
	}
}
</script>
</head>
<body>
<p id=&#34;s&#34;>scrollWidth, scrollLeft</p>

<div id=&#34;scroll&#34;>
<ul id=&#34;scroll2&#34; class=&#34;mqdemoa&#34;>
	<li>测试1</li>
	<li>测试2</li>
	<li>测试3</li>
	<li>测试4</li>
	<li>测试5</li>
	<li>测试6</li>
	<li>测试7</li>
	<li>测试8</li>
	<li>测试9</li>
	<li>测试10</li>
	<li>测试11</li>
	<li>测试12</li>
	<li>测试13</li>
	<li>测试14</li>
	<li>测试15</li>
	<li>测试16</li>
	<li>测试17</li>
	<li>测试18</li>
	<li>测试19</li>
	<li>测试20</li>
</ul>
</div>
<div id=&#34;prenext&#34;>
	<span class=&#34;pre&#34; 
onmouseover=&#34;this.style.background='#eee';this.style.color='#000'&#34; 
onmouseout=&#34;this.style.background='#000';this.style.color='#fff'&#34; 
onclick=&#34;dhs.pre();&#34;>上一页</span>
	<span class=&#34;next&#34; 
onmouseover=&#34;this.style.background='#eee';this.style.color='#000'&#34; 
onmouseout=&#34;this.style.background='#000';this.style.color='#fff'&#34; 
onclick=&#34;dhs.next();&#34;>下一页</span>
</div>
<dl>
<dt><h1>dhScroll Ver2.0.0 左右横向无缝滚动</h1></dt>
<dd>支持从左到右，从右到左两个方向的无缝滚动；</dd>

<dd>支持手动更改滚动方向；</dd>
<dd>支持连续/停顿方式滚动；</dd>
<dd>鼠标指向暂停滚动，移开继续；</dd>
<dt><h1>滚动对象模型</h1></dt>
<dd><块1><块2><块2的子元素>内容</块2的子元素></块2><
/块1></dd>
<dt><h1>滚动模型设置样式要点</h1></dt>

<dd>块1设置的宽度为展示宽度；overflow:hidden;</dd>
<dd>块2设置的宽度为块2子元素累计宽度（确保块2所有子元素排在一排）；</dd>
<dd>由于脚本中无缝部分采用innerHTML重写块2子元素，导致IE和FF在样式渲染上有所区别，
FF下块2的宽度应设置为块2宽度的两倍；</dd>
<dd>块2子元素必须确保排在一排，非表格的话最好float:left;</dd>
</dl>

<script type=&#34;text/javascript&#34;>
var dhs = new dhscroll();
dhs.scrollDOM = document.getElementById(&#34;scroll&#34;);
dhs.scrollCDOM = document.getElementById(&#34;scroll2&#34;);
dhs.showwidth = 600;
dhs.getsw();
dhs.go(&#34;left&#34;,true);
</script>
</body>
</html>
</textarea><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.xyhot.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp31928">
<!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; 
	&#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>&#34;>
<html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34; xml:lang=&#34;zh-cn&#34; lang=&#34;zh-cn&#34;>
<head>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; />
<meta http-equiv=&#34;Content-Language&#34; content=&#34;zh-cn&#34; />
<title>来自web developer navigator!的dhScroll Ver2.0.0 左右横向无缝滚动</title>
<style type=&#34;text/css&#34;>
/*块1样式*/
#scroll {width:600px;height:250px;overflow:hidden;}
/*块2样式*/
.mqdemoa {width:6000px!important;width:3000px;margin:0;padding:0;}
/*块2子元素样式*/
.mqdemoa li {width:148px;margin:0 1px;height:250px;background:red;float:left;list-style:none;}

/*其他样式，与scroll对象无关联*/
#prenext {width:600px;height:20px;overflow:hidden;}
#prenext span {display:block;font:12px &#34;宋体&#34;;width:50%;height:20px;line-height:20px;text-align:center;cursor:pointer;color:#fff;background:#000;}
#prenext .pre {float:left;}
#prenext .next {float:right;}
</style>
<script type=&#34;text/javascript&#34;>
function dhscroll(){
	//author:dh20156
	var dh = this;
	this.autoid = null;
	//块1
	this.scrollDOM = null;
	//块2
	this.scrollCDOM = null;
	//展示宽度（和块1宽度一致）
	this.showwidth = 0;
	//每次滚动长度，这个值要能被this.showwidth整除才行
	this.steplength = 20;
	var oldlength = this.steplength;
	//滚动时间间隔
	this.steptime = 1;
	//停顿时间
	this.resttime = 3000;
	//滚动长度
	this.uvwidth = 0;

	//无缝设置过程
	this.getsw = function(){
		var tempw = this.scrollCDOM.offsetWidth;
		var temps = this.scrollCDOM.innerHTML;
		this.scrollCDOM.innerHTML = [temps,temps].join(&#34;&#34;);
		this.scrollCDOM.style.width = tempw*2+&#34;px&#34;;
		if(document.attachEvent){
			this.scrollDOM.attachEvent(&#34;onmouseover&#34;,dh.pause);
			this.scrollDOM.attachEvent(&#34;onmouseout&#34;,dh.goon);
		}else{
			this.scrollDOM.addEventListener(&#34;mouseover&#34;,dh.pause,true);
			this.scrollDOM.addEventListener(&#34;mouseout&#34;,dh.goon,true);
		}
		this.uvwidth = Math.ceil(this.scrollDOM.scrollWidth / 2);
	}

	//从右到左
	this.scrollleft = function(){
		if(this.autoid!=null){
			window.clearTimeout(this.autoid);
		}
		var uvleft = this.scrollDOM.scrollLeft;
		uvleft += this.steplength;

		this.scrollDOM.scrollLeft = uvleft;

		if(uvleft>=this.uvwidth){
			this.scrollDOM.scrollLeft = 0;
		}
		
		if(uvleft % this.showwidth == 0){
			if(this.autostart){this.autoid = window.setTimeout(function(){dh.scrollleft()},dh.resttime);}
		}else{
			this.autoid = window.setTimeout(function(){dh.scrollleft()},dh.steptime);
		}
		document.getElementById(&#34;s&#34;).innerHTML = this.uvwidth+&#34;,&#34;+uvleft;
	}

	//从左到右
	this.scrollright = function(){
		if(this.autoid!=null){
			window.clearTimeout(this.autoid);
		}
		var uvleft = this.scrollDOM.scrollLeft;
		uvleft -= this.steplength;

		this.scrollDOM.scrollLeft = uvleft;

		if(uvleft <= 0){
			this.scrollDOM.scrollLeft = this.uvwidth;
		}

		if(uvleft % this.showwidth == 0){
			if(this.autostart){this.autoid = window.setTimeout(function(){dh.scrollright()},dh.resttime);}
		}else{
			this.autoid = window.setTimeout(function(){dh.scrollright()},dh.steptime);
		}
		document.getElementById(&#34;s&#34;).innerHTML = this.uvwidth+&#34;,&#34;+uvleft;
	}

	//开始滚动，参数为方向，首屏是否停顿
	this.go = function(direction,rest){
		this.autostart = true;
		if(this.autoid!=null){
			window.clearTimeout(this.autoid);
		}
		if(direction==&#34;left&#34;){
			if(rest){
				this.autoid = window.setTimeout(function(){dh.scrollleft()},5000);
			}else{
				dh.scrollleft();
			}
		}else{
			if(rest){
				this.autoid = window.setTimeout(function(){dh.scrollright()},5000);
			}else{
				dh.scrollright();
			}
		}
	}

	//往右
	this.pre = function(){
			this.scrollright();
	}
	//往左
	this.next = function(){
			this.scrollleft();
	}
	//暂停
	this.pause = function(){
		dh.oldlength = dh.steplength;
		dh.steplength = 0;
	}
	//继续
	this.goon = function(){
		dh.steplength = dh.oldlength;
	}
}
</script>
</head>
<body>
<p id=&#34;s&#34;>scrollWidth, scrollLeft</p>

<div id=&#34;scroll&#34;>
<ul id=&#34;scroll2&#34; class=&#34;mqdemoa&#34;>
	<li>测试1</li>
	<li>测试2</li>
	<li>测试3</li>
	<li>测试4</li>
	<li>测试5</li>
	<li>测试6</li>
	<li>测试7</li>
	<li>测试8</li>
	<li>测试9</li>
	<li>测试10</li>
	<li>测试11</li>
	<li>测试12</li>
	<li>测试13</li>
	<li>测试14</li>
	<li>测试15</li>
	<li>测试16</li>
	<li>测试17</li>
	<li>测试18</li>
	<li>测试19</li>
	<li>测试20</li>
</ul>
</div>
<div id=&#34;prenext&#34;>
	<span class=&#34;pre&#34; onmouseover=&#34;this.style.background='#eee';this.style.color='#000'&#34; onmouseout=&#34;this.style.background='#000';this.style.color='#fff'&#34; onclick=&#34;dhs.pre();&#34;>上一页</span>
	<span class=&#34;next&#34; onmouseover=&#34;this.style.background='#eee';this.style.color='#000'&#34; onmouseout=&#34;this.style.background='#000';this.style.color='#fff'&#34; onclick=&#34;dhs.next();&#34;>下一页</span>
</div>
<dl>
<dt><h1>dhScroll Ver2.0.0 左右横向无缝滚动</h1></dt>
<dd>支持从左到右，从右到左两个方向的无缝滚动；</dd>

<dd>支持手动更改滚动方向；</dd>
<dd>支持连续/停顿方式滚动；</dd>
<dd>鼠标指向暂停滚动，移开继续；</dd>
<dt><h1>滚动对象模型</h1></dt>
<dd><块1><块2><块2的子元素>内容</块2的子元素></块2></块1></dd>
<dt><h1>滚动模型设置样式要点</h1></dt>

<dd>块1设置的宽度为展示宽度；overflow:hidden;</dd>
<dd>块2设置的宽度为块2子元素累计宽度（确保块2所有子元素排在一排）；</dd>
<dd>由于脚本中无缝部分采用innerHTML重写块2子元素，导致IE和FF在样式渲染上有所区别，FF下块2的宽度应设置为块2宽度的两倍；</dd>
<dd>块2子元素必须确保排在一排，非表格的话最好float:left;</dd>
</dl>

<script type=&#34;text/javascript&#34;>
var dhs = new dhscroll();
dhs.scrollDOM = document.getElementById(&#34;scroll&#34;);
dhs.scrollCDOM = document.getElementById(&#34;scroll2&#34;);
dhs.showwidth = 600;
dhs.getsw();
dhs.go(&#34;left&#34;,true);
</script>
</body>
</html>
</TEXTAREA><br/><INPUT onclick="runEx('temp31928')"  type="button" value="运行此代码"/> <INPUT onclick="doCopy('temp31928')"  type="button" value="复制此代码"/><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=467" /> 
	  <id>http://www.xyhot.com/default.asp?id=467</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[JS]可输入选择框简单原型]]></title>
	  <author>
		 <name>xyhot.com</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=5" label="HTML/JS/CSS" /> 
	  <updated>2009-12-22T10:09:42+08:00</updated>
	  <published>2009-12-22T10:09:42+08:00</published>
		  <summary type="html"><![CDATA[<textarea name="code" class="xml">
<style type=&#34;text/css&#34;>
.combobx {width:100px;overflow:hidden;position:relative;background:red;}
.combobxB {width:100px;position:absolute;left:0;top:1px;clip:rect(1px auto auto 81px);}
/*FF下调整一点点.combobxB {width:100px;position:absolute;left:0;top:0;
clip:rect(2px auto auto 81px);}*/
.combobxA {width:100px;}
</style>

<div class=&#34;combobx&#34;>
<input type=&#34;text&#34; class=&#34;combobxA&#34;>
<sel&#101;ct class=&#34;combobxB&#34;>
  <option>小学</option>
  <option>中学</option>
  <option>大学</option>
</sel&#101;ct>
</div>
</textarea><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.xyhot.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp63017">
<style type=&#34;text/css&#34;>
.combobx {width:100px;overflow:hidden;position:relative;background:red;}
.combobxB {width:100px;position:absolute;left:0;top:1px;clip:rect(1px auto auto 81px);}
/*FF下调整一点点.combobxB {width:100px;position:absolute;left:0;top:0;
clip:rect(2px auto auto 81px);}*/
.combobxA {width:100px;}
</style>

<div class=&#34;combobx&#34;>
<input type=&#34;text&#34; class=&#34;combobxA&#34;>
<sel&#101;ct class=&#34;combobxB&#34;>
  <option>小学</option>
  <option>中学</option>
  <option>大学</option>
</sel&#101;ct>
</div>
</TEXTAREA><br/><INPUT onclick="runEx('temp63017')"  type="button" value="运行此代码"/> <INPUT onclick="doCopy('temp63017')"  type="button" value="复制此代码"/><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=466" /> 
	  <id>http://www.xyhot.com/default.asp?id=466</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[org.apache.commons.lang.StringUtil 常用方法使用例子]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=8" label="Java" /> 
	  <updated>2009-12-18T11:35:30+08:00</updated>
	  <published>2009-12-18T11:35:30+08:00</published>
		  <summary type="html"><![CDATA[<strong><span style="color:Blue">1.空字符串检查</span></strong><br/>使用函数:&nbsp;StringUtils.isBlank(testString)<br/>函数介绍:&nbsp;当testString为空,长度为零或者仅由空白字符(whitespace)组成时,返回True;否则返回False<br/>例程:<br/><textarea name="code" class="java">
    String test = &#34;&#34;;
    String test2 = &#34;\n\n\t&#34;;
    String test3 = null;
    String test4 = &#34;Test&#34;; 
    System.out.println( &#34;test blank? &#34; + StringUtils.isBlank( test ) );
    System.out.println( &#34;test2 blank? &#34; + StringUtils.isBlank( test2 ) );
    System.out.println( &#34;test3 blank? &#34; + StringUtils.isBlank( test3 ) );
    System.out.println( &#34;test4 blank? &#34; + StringUtils.isBlank( test4 ) );
</textarea><br/>输出如下:<br/>test&nbsp;blank?&nbsp;true<br/>test2&nbsp;blank?&nbsp;true<br/>test3&nbsp;blank?&nbsp;true<br/>test4&nbsp;blank?&nbsp;False<br/>函数StringUtils.isNotBlank(testString)的功能与StringUtils.isBlank(testString)相反.<br/><br/><strong><span style="color:Blue">2.清除空白字符</span></strong><br/>使用函数:&nbsp;StringUtils.trimToNull(testString)<br/>函数介绍:清除掉testString首尾的空白字符,如果仅testString全由空白字符<br/>(whitespace)组成则返回null<br/>例程:<br/><textarea name="code" class="java">
    String test1 = &#34;\t&#34;;
    String test2 = &#34; A Test &#34;;
    String test3 = null;

    System.out.println( &#34;test1 trimToNull: &#34; + StringUtils.trimToNull( test1 ) );
    System.out.println( &#34;test2 trimToNull: &#34; + StringUtils.trimToNull( test2 ) );
    System.out.println( &#34;test3 trimToNull: &#34; + StringUtils.trimToNull( test3 ) );
</textarea><br/>输出如下:<br/>test1&nbsp;trimToNull:&nbsp;null<br/>test2&nbsp;trimToNull:&nbsp;A&nbsp;Test<br/>test3&nbsp;trimToNull:&nbsp;null<br/><br/>注意：函数StringUtils.trim(testString)与<br/>StringUtils.trimToNull(testString)功能类似，但testString由空白字符<br/>(whitespace)组成时返回零长度字符串。<br/><br/><strong><span style="color:Blue">3.取得字符串的缩写</span></strong><br/>使用函数:&nbsp;StringUtils.abbreviate(testString,width)和StringUtils.abbreviate(testString,offset，width)<br/>函数介绍:在给定的width内取得testString的缩写,当testString的长度小于width则返回原字符串.<br/>例程:<br/><textarea name="code" class="java">
    String test = &#34;This is a test of the abbreviation.&#34;;
    String test2 = &#34;Test&#34;;

    System.out.println( StringUtils.abbreviate( test, 15 ) );
    System.out.println( StringUtils.abbreviate( test, 5,15 ) );
    System.out.println( StringUtils.abbreviate( test2, 10 ) );
</textarea><br/>输出如下:<br/>This&nbsp;is&nbsp;a&nbsp;te...<br/>...is&nbsp;a&nbsp;test...<br/>Test<br/><br/><strong><span style="color:Blue">4.劈分字符串</span></strong><br/>使用函数:&nbsp;StringUtils.split(testString,splitChars,arrayLength)<br/>函数介绍:splitChars中可以包含一系列的字符串来劈分testString,并可以设定得<br/>到数组的长度.注意设定长度arrayLength和劈分字符串间有抵触关系,建议一般情况下<br/>不要设定长度.<br/>例程:<br/><textarea name="code" class="java">
    String input = &#34;A b,c.d|e&#34;;
    String input2 = &#34;Pharmacy, basketball funky&#34;;
   
    String[] array1 = StringUtils.split( input, &#34; ,.|&#34;);
    String[] array2 = StringUtils.split( input2, &#34; ,&#34;, 2 );

    System.out.println( ArrayUtils.toString( array1 ) );
    System.out.println( ArrayUtils.toString( array2 ) );
</textarea><br/>输出如下:<br/>{A,b,c,d,e}<br/>{Pharmacy,basketball&nbsp;funky}<br/><br/><strong><span style="color:Blue">5.查找嵌套字符串</span></strong><br/>使用函数:StringUtils.substringBetween(testString,header,tail)<br/>函数介绍：在testString中取得header和tail之间的字符串。不存在则返回空<br/>例程：<br/><textarea name="code" class="java">
    String htmlContent = &#34;ABC1234ABC4567&#34;;
    System.out.println(StringUtils.substringBetween(htmlContent, &#34;1234&#34;, &#34;4567&#34;));
    System.out.println(StringUtils.substringBetween(htmlContent, &#34;12345&#34;, &#34;4567&#34;));
</textarea><br/>输出如下：<br/>&nbsp;&nbsp;&nbsp;&nbsp;ABC<br/>&nbsp;&nbsp;&nbsp;&nbsp;null<br/><br/><br/><strong><span style="color:Blue">6.去除尾部换行符</span></strong><br/>使用函数:StringUtils.chomp(testString)<br/>函数介绍:去除testString尾部的换行符<br/>例程:<br/><textarea name="code" class="java">
    String input = &#34;Hello\n&#34;;
    System.out.println( StringUtils.chomp( input ));
    String input2 = &#34;Another test\r\n&#34;;
    System.out.println( StringUtils.chomp( input2 ));
</textarea><br/>输出如下:<br/>&nbsp;&nbsp;&nbsp;&nbsp;Hello<br/>&nbsp;&nbsp;&nbsp;&nbsp;Another&nbsp;test<br/><br/><br/><strong><span style="color:Blue">7.重复字符串</span></strong><br/>使用函数:StringUtils.repeat(repeatString,count)<br/>函数介绍:得到将repeatString重复count次后的字符串<br/>例程:<br/><textarea name="code" class="java">
    System.out.println( StringUtils.repeat( &#34;*&#34;, 10));
    System.out.println( StringUtils.repeat( &#34;China &#34;, 5));
</textarea><br/>输出如下:<br/>&nbsp;&nbsp;&nbsp;&nbsp;**********<br/>&nbsp;&nbsp;&nbsp;&nbsp;China&nbsp;China&nbsp;China&nbsp;China&nbsp;China<br/><br/>其他函数:StringUtils.center(&nbsp;testString,&nbsp;count,repeatString&nbsp;);<br/>函数介绍:把testString插入将repeatString重复多次后的字符串中间,得到字符串<br/>的总长为count<br/>例程:<br/><textarea name="code" class="java">
    System.out.println( StringUtils.center( &#34;China&#34;, 11,&#34;*&#34;));
</textarea><br/>输出如下:<br/>&nbsp;&nbsp;&nbsp;&nbsp;***China***<br/><br/><br/><strong><span style="color:Blue">8.颠倒字符串</span></strong><br/>使用函数:StringUtils.reverse(testString)<br/>函数介绍:得到testString中字符颠倒后的字符串<br/>例程:<br/><textarea name="code" class="java">
    System.out.println( StringUtils.reverse(&#34;ABCDE&#34;));
</textarea><br/>输出如下:<br/>&nbsp;&nbsp;&nbsp;&nbsp;EDCBA<br/><br/><strong><span style="color:Blue">9.判断字符串内容的类型</span></strong><br/>函数介绍:<br/>StringUtils.isNumeric(&nbsp;testString&nbsp;)&nbsp;:如果testString全由数字组成返回True<br/>StringUtils.isAlpha(&nbsp;testString&nbsp;)&nbsp;:如果testString全由字母组成返回True<br/>StringUtils.isAlphanumeric(&nbsp;testString&nbsp;)&nbsp;:如果testString全由数字或数字组<br/>成返回True<br/>StringUtils.isAlphaspace(&nbsp;testString&nbsp;)&nbsp;:如果testString全由字母或空格组<br/>成返回True<br/><br/>例程:<br/><textarea name="code" class="java">
    String state = &#34;Virginia&#34;;
    System.out.println( &#34;Is state number? &#34; + StringUtils.isNumeric(state ) );
    System.out.println( &#34;Is state alpha? &#34; + StringUtils.isAlpha( state ));
    System.out.println( &#34;Is state alphanumeric? &#34; +StringUtils.isAlphanumeric( state ) );
    System.out.println( &#34;Is state alphaspace? &#34; + StringUtils.isAlphaSpace( state ) );
</textarea><br/>输出如下:<br/>&nbsp;&nbsp;&nbsp;&nbsp;Is&nbsp;state&nbsp;number?&nbsp;false<br/>&nbsp;&nbsp;&nbsp;&nbsp;Is&nbsp;state&nbsp;alpha?&nbsp;true<br/>&nbsp;&nbsp;&nbsp;&nbsp;Is&nbsp;state&nbsp;alphanumeric?&nbsp;true<br/>&nbsp;&nbsp;&nbsp;&nbsp;Is&nbsp;state&nbsp;alphaspace?&nbsp;true<br/><br/><strong><span style="color:Blue">10.取得某字符串在另一字符串中出现的次数</span></strong><br/>使用函数:StringUtils.countMatches(testString,seqString)<br/>函数介绍:取得seqString在testString中出现的次数,未发现则返回零<br/>例程:<br/><textarea name="code" class="java">
    System.out.println(StringUtils.countMatches( &#34;Chinese People&#34;, &#34;e&#34;));
</textarea><br/>输出:<br/>&nbsp;&nbsp;&nbsp;&nbsp;4<br/><br/><strong><span style="color:Blue">11.部分截取字符串</span></strong><br/>使用函数:<br/>StringUtils.substringBetween(testString,fromString,toString&nbsp;):取得两字符<br/>之间的字符串<br/>StringUtils.substringAfter(&nbsp;):取得指定字符串后的字符串<br/>StringUtils.substringBefore(&nbsp;)：取得指定字符串之前的字符串<br/>StringUtils.substringBeforeLast(&nbsp;)：取得最后一个指定字符串之前的字符串<br/>StringUtils.substringAfterLast(&nbsp;)：取得最后一个指定字符串之后的字符串<br/><br/>函数介绍：上面应该都讲明白了吧。<br/>例程：<br/><textarea name="code" class="java">
    String formatted = &#34; 25 * (30,40) [50,60] | 30&#34;;
    System.out.print(&#34;N0: &#34; + StringUtils.substringBeforeLast( formatted, &#34;*&#34; ) );
    System.out.print(&#34;, N1: &#34; + StringUtils.substringBetween( formatted, &#34;(&#34;, &#34;,&#34; ) );
    System.out.print(&#34;, N2: &#34; + StringUtils.substringBetween( formatted, &#34;,&#34;, &#34;)&#34; ) );
    System.out.print(&#34;, N3: &#34; + StringUtils.substringBetween( formatted, &#34;[&#34;, &#34;,&#34; ) );
    System.out.print(&#34;, N4: &#34; + StringUtils.substringBetween( formatted, &#34;,&#34;, &#34;]&#34; ) );
    System.out.print(&#34;, N5: &#34; + StringUtils.substringAfterLast( formatted, &#34;|&#34; ) );
</textarea><br/>输出如下：<br/>&nbsp;&nbsp;&nbsp;&nbsp;N0:&nbsp;25&nbsp;,&nbsp;N1:&nbsp;30,&nbsp;N2:&nbsp;40,&nbsp;N3:&nbsp;50,&nbsp;N4:&nbsp;40)&nbsp;[50,60,&nbsp;N5:&nbsp;30<br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=465" /> 
	  <id>http://www.xyhot.com/default.asp?id=465</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[JS]iframe未正确闭合的错误]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=5" label="HTML/JS/CSS" /> 
	  <updated>2009-12-14T11:55:12+08:00</updated>
	  <published>2009-12-14T11:55:12+08:00</published>
		  <summary type="html"><![CDATA[<textarea name="code" class="xml">
<!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34;
&#34;<a href="http://www.w3.org/TR/html4/strict.dtd" target="_blank">http://www.w3.org/TR/html4/strict.dtd</a>&#34;>
<html>
<head>
<title>Rank's HTML document</title>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34;>
</head>
<body>
<h1>坑</h1>
<div class=&#34;hd&#34;><h3>hi, guy</h3></div>
<div class=&#34;bd&#34;><p>wh&#101;re is your alert of your javascript?</p></div>
<iframe src=&#34;about:blank&#34; frameborder=&#34;0&#34; />
</body>
<script type=&#34;text/javascript&#34;>
alert('这个alert不能执行!');
</script>
</html>
</textarea><br/><textarea name="code" class="xml">
<!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34;
&#34;<a href="http://www.w3.org/TR/html4/strict.dtd" target="_blank">http://www.w3.org/TR/html4/strict.dtd</a>&#34;>
<html>
<head>
<title>Rank's HTML document</title>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34;>
</head>
<body>
<h1>坑</h1>
<div class=&#34;hd&#34;><h3>hi, guy</h3></div>
<div class=&#34;bd&#34;><p>wh&#101;re is your alert of your javascript?</p></div>
<iframe src=&#34;about:blank&#34; frameborder=&#34;0&#34; ></iframe >
</body>
<script type=&#34;text/javascript&#34;>
alert('恭喜你，这个alert执行了!');
</script>
</html>
</textarea><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.xyhot.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp55654">
<!DOCTYPE HTML PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34;
&#34;<a href="http://www.w3.org/TR/html4/strict.dtd" target="_blank">http://www.w3.org/TR/html4/strict.dtd</a>&#34;>
<html>
<head>
<title>Rank's HTML document</title>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=gb2312&#34;>
</head>
<body>
<h1>坑</h1>
<div class=&#34;hd&#34;><h3>hi, guy</h3></div>
<div class=&#34;bd&#34;><p>wh&#101;re is your alert of your javascript?</p></div>
<iframe src=&#34;about:blank&#34; frameborder=&#34;0&#34; />
</body>
<script type=&#34;text/javascript&#34;>
alert('这个alert不能执行!');
</script>
</html>
</TEXTAREA><br/><INPUT onclick="runEx('temp55654')"  type="button" value="运行此代码"/> <INPUT onclick="doCopy('temp55654')"  type="button" value="复制此代码"/><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=464" /> 
	  <id>http://www.xyhot.com/default.asp?id=464</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[CSS]列表表格布局]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=5" label="HTML/JS/CSS" /> 
	  <updated>2009-12-07T12:25:45+08:00</updated>
	  <published>2009-12-07T12:25:45+08:00</published>
		  <summary type="html"><![CDATA[<textarea name="code" class="xml">
<!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; 
	&#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>&#34;>
<html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34; xml:lang=&#34;zh-cn&#34; lang=&#34;zh-cn&#34;>
<head>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; />
<meta http-equiv=&#34;Content-Language&#34; content=&#34;zh-cn&#34; />
<title>test</title>
<style type=&#34;text/css&#34;>
#test{width:290px;background:#eee;}
#test ul{overflow:hidden;zoom:1;margin:0;padding:0 5px 10px 5px;}
#test li{display:inline;float:left;width:60px;height:60px;margin:10px 5px 0;list-style:none;background:#333;}
</style>
</head>
<body>
<div id=&#34;test&#34;>
<ul>
	<li>aaa</li>
	<li>bbb</li>
	<li>ccc</li>
	<li>ddd</li>
	<li>eee</li>
	<li>fff</li>
	<li>ggg</li>
	<li>hhh</li>
	<li>aaa</li>
	<li>bbb</li>
	<li>ccc</li>
	<li>ddd</li>
	<li>eee</li>
	<li>fff</li>
	<li>ggg</li>
	<li>hhh</li>
</ul>
</div>
</body>
</html>
</textarea><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.xyhot.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp37091">
<!DOCTYPE html PUBLIC &#34;-//W3C//DTD XHTML 1.0 Strict//EN&#34; 
	&#34;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>&#34;>
<html xmlns=&#34;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&#34; xml:lang=&#34;zh-cn&#34; lang=&#34;zh-cn&#34;>
<head>
<meta http-equiv=&#34;Content-Type&#34; content=&#34;text/html; charset=utf-8&#34; />
<meta http-equiv=&#34;Content-Language&#34; content=&#34;zh-cn&#34; />
<title>test</title>
<style type=&#34;text/css&#34;>
#test{width:290px;background:#eee;}
#test ul{overflow:hidden;zoom:1;margin:0;padding:0 5px 10px 5px;}
#test li{display:inline;float:left;width:60px;height:60px;margin:10px 5px 0;list-style:none;background:#333;}
</style>
</head>
<body>
<div id=&#34;test&#34;>
<ul>
	<li>aaa</li>
	<li>bbb</li>
	<li>ccc</li>
	<li>ddd</li>
	<li>eee</li>
	<li>fff</li>
	<li>ggg</li>
	<li>hhh</li>
	<li>aaa</li>
	<li>bbb</li>
	<li>ccc</li>
	<li>ddd</li>
	<li>eee</li>
	<li>fff</li>
	<li>ggg</li>
	<li>hhh</li>
</ul>
</div>
</body>
</html>
</TEXTAREA><br/><INPUT onclick="runEx('temp37091')"  type="button" value="运行此代码"/> <INPUT onclick="doCopy('temp37091')"  type="button" value="复制此代码"/><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=463" /> 
	  <id>http://www.xyhot.com/default.asp?id=463</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[虚拟工作站(VMware Workstation 虚拟机)v7.0 汉化安装特别版+注册机]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=13" label="Other" /> 
	  <updated>2009-12-02T09:29:59+08:00</updated>
	  <published>2009-12-02T09:29:59+08:00</published>
		  <summary type="html"><![CDATA[在虚拟机上运行Windows&nbsp;7或是Vista的用户对于无缘使用其Aero效果一定感到很失望，现在除了微软自己的Windows&nbsp;Virtual&nbsp;PC之外VMWare的虚拟机也可以使用Aero效果了。<br/>VMware在最新的Workstation&nbsp;7中添加了对Aero&nbsp;Glass等功能的支持。<br/><span style="color:Blue">　　<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*完善了对3D的支持<br/>　　*支持最新Windows&nbsp;7&nbsp;WDDM驱动<br/>　　*支持vSphere&nbsp;4.0和ESX<br/>　　*可直接使用虚拟机进行打印<br/>　　*AutoProtect<br/>　　*支持对虚拟机进行加密<br/>　　*支持IPv6、ALSA<br/>　　*虚拟磁盘可扩展，无需使用额外软件</span><br/>下载页面:<br/><a target="_blank" href="http://www.verycd.com/topics/2778243/">VMware&nbsp;Workstation&nbsp;汉化安装特别版+注册机</a><br/>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=462" /> 
	  <id>http://www.xyhot.com/default.asp?id=462</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[AOP DynamicProxy动态代理模式(类似Spring AOP 的实现) ]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=8" label="Java" /> 
	  <updated>2009-11-30T18:27:41+08:00</updated>
	  <published>2009-11-30T18:27:41+08:00</published>
		  <summary type="html"><![CDATA[AOP的意思就是面向切面编程.<br/>OO注重的是我们解决问题的方法(封装成Method),而AOP注重的是许多解决解决问题的方法中的共同点,是对OO思想的一种补充!<br/>还是拿人家经常举的一个例子讲解一下吧:<br/>比如说,我们现在要开发的一个应用里面有很多的业务方法,但是,我们现在要对这个方法的执行做全面监控,或部分监控.也许我们就会在要一些方法前去加上一条日志记录,<br/>我们写个例子看看我们最简单的解决方案<br/>我们先写一个接口IHello.java代码如下:<br/><textarea name="code" class="java">
 public interface IHello {
     /** *//**
      * 假设这是一个业务方法
      * @param name
      */
     void sayHello(String name);
 }
10
</textarea><br/>里面有个方法,用于输入&#34;Hello&#34;&nbsp;加传进来的姓名;我们去写个类实现IHello接口<br/><textarea name="code" class="java">
public class Hello implements IHello {
    public void sayHello(String name) {
        System.out.println(&#34;Hello &#34; + name);
    }
}
</textarea><br/>现在我们要为这个业务方法加上日志记录的业务,我们在不改变原代码的情况下,我们会去怎么做呢?也许,你会去写一个类去实现IHello接口,并依赖Hello这个类.代码如下:<br/><textarea name="code" class="java">
public class HelloProxy implements IHello {
    private IHello hello;
    public HelloProxy(IHello hello) {
        this.hello = hello;
    }
    public void sayHello(String name) {
        Logger.logging(Level.DEBUGE, &#34;sayHello method start.&#34;);
        hello.sayHello(name);
        Logger.logging(Level.INFO, &#34;sayHello method end!&#34;);
    }
}
</textarea><br/>其中.Logger类和Level枚举代码如下:<br/>Logger.java<br/><textarea name="code" class="java">
import java.util.Date;
public class Logger{
    /** 
     * 根据等级记录日志
     * @param level
     * @param context
     */
    public static void logging(Level level, String context) {
        if (level.equals(Level.INFO)) {
            System.out.println(new Date().toLocaleString() + &#34; &#34; + context);
        }
        if (level.equals(Level.DEBUGE)) {
            System.err.println(new Date() + &#34; &#34; + context);
        }
    }
}
</textarea><br/>Level.java<br/><textarea name="code" class="java">
public enum Level {
    INFO,DEBUGE;
}
</textarea><br/>那我们去写个测试类看看,代码如下:<br/>Test.java<br/><textarea name="code" class="java">
public class Test {
    public static void main(String[] args) {
        IHello hello = new HelloProxy(new Hello());
        hello.sayHello(&#34;Doublej&#34;);
    }
}
</textarea><br/>运行以上代码我们可以得到下面结果:<br/><textarea name="code" class="java">
Tue Mar 04 20:57:12 CST 2008 sayHello method start.
Hello Doublej
2008-3-4 20:57:12 sayHello method end!
</textarea><br/>从上面的代码我们可以看出,hello对象是被HelloProxy这个所谓的代理态所创建的.这样,如果我们以后要把日志记录的功能去掉.那我们只要把得到hello对象的代码改成以下:<br/><textarea name="code" class="java">
public class Test {
    public static void main(String[] args) {
        IHello hello = new Hello();
        hello.sayHello(&#34;Doublej&#34;);
    }
}
</textarea><br/>上面代码,可以说是AOP最简单的实现!<br/>但是我们会发现一个问题,如果我们像Hello这样的类很多,那么,我们是不是要去写很多个HelloProxy这样的类呢.没错,是的.其实也是一种很麻烦的事.在jdk1.3以后.jdk跟我们提供了一个API&nbsp;&nbsp;&nbsp;java.lang.reflect.InvocationHandler的类.&nbsp;这个类可以让我们在JVM调用某个类的方法时动态的为些方法做些什么事.让我们把以上的代码改一下来看看效果.<br/>同样,我们写一个IHello的接口和一个Hello的实现类.在接口中.我们定义两个方法;代码如下&nbsp;:<br/><br/>IHello.java<br/><textarea name="code" class="java">
public interface IHello {
    /** *//**
     * 业务处理A方法
     * @param name
     */
    void sayHello(String name);
    /** *//**
     * 业务处理B方法
     * @param name
     */
    void sayGoogBye(String name);
}
</textarea><br/>Hello.java&nbsp;<br/><textarea name="code" class="java">
public class Hello implements IHello {
    public void sayHello(String name) {
        System.out.println(&#34;Hello &#34; + name);
    }
    public void sayGoogBye(String name) {
        System.out.println(name+&#34; GoodBye!&#34;);
    }
}
</textarea><br/>我们一样的去写一个代理类.只不过.让这个类去实现java.lang.reflect.InvocationHandler接口,代码如下:<br/><textarea name="code" class="java">
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class DynaProxyHello implements InvocationHandler {
    /** 
     * 要处理的对象(也就是我们要在方法的前后加上业务逻辑的对象,如例子中的Hello)
     */
    private Object delegate;
    /** 
     * 动态生成方法被处理过后的对象 (写法固定) 
     * @param delegate
     * @param proxy
     * @return
     */
    public Object bind(Object delegate) {
        this.delegate = delegate;
        return Proxy.newProxyInstance(
                this.delegate.getClass().getClassLoader(), this.delegate
                        .getClass().getInterfaces(), this);
    }
    /** 
     * 要处理的对象中的每个方法会被此方法送去JVM调用,也就是说,要处理的对象的方法只能通过此方法调用
     * 此方法是动态的,不是手动调用的
     */
    public Object invoke(Object proxy, Method method, Object[] args)
            throws Throwable {
        Object result = null;
        try {
            //执行原来的方法之前记录日志
            Logger.logging(Level.DEBUGE, method.getName() + &#34; Method end .&#34;);
            
            //JVM通过这条语句执行原来的方法(反射机制)
            result = method.invoke(this.delegate, args);
            //执行原来的方法之后记录日志
            Logger.logging(Level.INFO, method.getName() + &#34; Method Start!&#34;);
        } catch (Exception e) {
            e.printStackTrace();
        }
        //返回方法返回值给调用者
        return result;
    }
}
</textarea><br/>上面类中出现的Logger类和Level枚举还是和上一上例子的实现是一样的.这里就不贴出代码了.<br/><br/>让我们写一个Test类去测试一下.代码如下:<br/>Test.java<br/><textarea name="code" class="java">
public class Test {
    public static void main(String[] args) {
        IHello hello = (IHello)new DynaProxyHello().bind(new Hello());
        hello.sayGoogBye(&#34;Double J&#34;);
        hello.sayHello(&#34;Double J&#34;);        
    }
}
</textarea><br/>运行输出的结果如下:<br/><textarea name="code" class="java">
Tue Mar 04 21:24:03 CST 2008 sayGoogBye Method end .
Double J GoodBye!
2008-3-4 21:24:03 sayGoogBye Method Start!
Tue Mar 04 21:24:03 CST 2008 sayHello Method end .
Hello Double J
2008-3-4 21:24:03 sayHello Method Start!
</textarea><br/>由于线程的关系,第二个方法的开始出现在第一个方法的结束之前.这不是我们所关注的!<br/>从上面的例子我们看出.只要你是采用面向接口编程,那么,你的任何对象的方法执行之前要加上记录日志的操作都是可以的.他(DynaPoxyHello)自动去代理执行被代理对象(Hello)中的每一个方法,一个java.lang.reflect.InvocationHandler接口就把我们的代理对象和被代理对象解藕了.但是,我们又发现还有一个问题,这个DynaPoxyHello对象只能跟我们去在方法前后加上日志记录的操作.我们能不能把DynaPoxyHello对象和日志操作对象(Logger)解藕呢?<br/>结果是肯定的.让我们来分析一下我们的需求.<br/>我们要在被代理对象的方法前面或者后面去加上日志操作代码(或者是其它操作的代码),<br/>那么,我们可以抽象出一个接口,这个接口里就只有两个方法,一个是在被代理对象要执行方法之前执行的方法,我们取名为start,第二个方法就是在被代理对象执行方法之后执行的方法,我们取名为end&nbsp;.接口定义如下&nbsp;:<br/><textarea name="code" class="java">
import java.lang.reflect.Method;
public interface IOperation {
    /**
     * 方法执行之前的操作
     * @param method
     */
    void start(Method method);
    /**
     * 方法执行之后的操作
     * @param method
     */
    void end(Method method);
}
</textarea><br/>我们去写一个实现上面接口的类.我们把作他真正的操作者,如下面是日志操作者的一个类:<br/>LoggerOperation.java<br/><textarea name="code" class="java">
import java.lang.reflect.Method;
public class LoggerOperation implements IOperation {
    public void end(Method method) {
        Logger.logging(Level.DEBUGE, method.getName() + &#34; Method end .&#34;);
    }
    public void start(Method method) {
        Logger.logging(Level.INFO, method.getName() + &#34; Method Start!&#34;);
    }
}
</textarea><br/>然后我们要改一下代理对象DynaProxyHello中的代码.如下:<br/><textarea name="code" class="java">
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
public class DynaProxyHello implements InvocationHandler {
    /**
     * 操作者
     */
    private Object proxy;
    /**
     * 要处理的对象(也就是我们要在方法的前后加上业务逻辑的对象,如例子中的Hello)
     */
    private Object delegate;
    /**
     * 动态生成方法被处理过后的对象 (写法固定) 
     * @param delegate
     * @param proxy
     * @return
     */
    public Object bind(Object delegate,Object proxy) {
        
        this.proxy = proxy;
        this.delegate = delegate;
        return Proxy.newProxyInstance(
                this.delegate.getClass().getClassLoader(), this.delegate
                        .getClass().getInterfaces(), this);
    }
    /** 
     * 要处理的对象中的每个方法会被此方法送去JVM调用,也就是说,要处理的对象的方法只能通过此方法调用
     * 此方法是动态的,不是手动调用的
     */
    public Object invoke(Object proxy, Method method, Object[] args)
            throws Throwable {
        Object result = null;
        try {
            //反射得到操作者的实例
            Class clazz = this.proxy.getClass();
            //反射得到操作者的Start方法
            Method start = clazz.getDeclaredMethod(&#34;start&#34;,new Class[] { Method.class });
            //反射执行start方法
            start.invoke(this.proxy, new Object[] { method });
            //执行要处理对象的原本方法
            result = method.invoke(this.delegate, args);
//            反射得到操作者的end方法
            Method end = clazz.getDeclaredMethod(&#34;end&#34;,new Class[] { Method.class });
//            反射执行end方法
            end.invoke(this.proxy, new Object[] { method });

        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
}
</textarea><br/>然后我们把Test.java中的代码改一下.测试一下:<br/><textarea name="code" class="java">
public class Test {
    public static void main(String[] args) {
        IHello hello = (IHello)new DynaProxyHello().bind(new Hello(),new LoggerOperation());
        hello.sayGoogBye(&#34;Double J&#34;);
        hello.sayHello(&#34;Double J&#34;);
    }
}
</textarea><br/>结果还是一样的吧.<br/><br/>如果你想在每个方法之前加上日志记录,而不在方法后加上日志记录.你就把LoggerOperation类改成如下:<br/><textarea name="code" class="java">
import java.lang.reflect.Method;
public class LoggerOperation implements IOperation {
    public void end(Method method) {
        //Logger.logging(Level.DEBUGE, method.getName() + &#34; Method end .&#34;);
    }
    public void start(Method method) {
        Logger.logging(Level.INFO, method.getName() + &#34; Method Start!&#34;);
    }
}
</textarea><br/>运行一下.你就会发现,每个方法之后没有记录日志了.&nbsp;这样,我们就把代理者和操作者解藕了!<br/><br/>下面留一个问题给大家,如果我们不想让所有方法都被日志记录,我们应该怎么去解藕呢?<br/>我的想法是在代理对象的public&nbsp;Object&nbsp;invoke(Object&nbsp;proxy,&nbsp;Method&nbsp;method,&nbsp;Object[]&nbsp;args)方法里面加上个if(),对传进来的method的名字进行判断,判断的条件存在XML里面.这样我们就可以配置文件时行解藕了.如果有兴趣的朋友可以把操作者,被代理者,都通过配置文件进行配置&nbsp;,那么就可以写一个简单的SpringAOP框架了.&nbsp;]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=461" /> 
	  <id>http://www.xyhot.com/default.asp?id=461</id> 
  </entry>	
		
  <entry>
	  <title type="html"><![CDATA[[JS]获取浏览器窗体宽高数据]]></title>
	  <author>
		 <name>huheng1234</name>
		 <uri>http://www.xyhot.com/</uri>
		 <email>huheng1234@163.com</email>
	  </author>
	  <category term="" scheme="http://www.xyhot.com/default.asp?cateID=5" label="HTML/JS/CSS" /> 
	  <updated>2009-11-30T15:31:10+08:00</updated>
	  <published>2009-11-30T15:31:10+08:00</published>
		  <summary type="html"><![CDATA[<textarea name="code" class="jscript">
<body>
<script type=&#34;text/javascript&#34;>
//如果使用DTD申明，请注意document.documentElement与document.body的兼容处理
var s=&#34;&#34;;
s+=&#34;\r\n网页整体区域宽：&#34;+document.body.clientWidth;
s+=&#34;\r\n网页可见区域高：&#34;+document.documentElement.clientHeight;
//window.innerWidth -firefox;
s+=&#34;\r\n网页可见区域宽：&#34;+document.body.offsetWidth+&#34;(包括边线的宽)&#34;;
s+=&#34;\r\n网页可见区域高：&#34;+document.body.offsetHeight+&#34;(包括边线的高)&#34;;
s+=&#34;\r\n网页正文全文宽：&#34;+document.body.scrollWidth;
s+=&#34;\r\n网页正文全文高：&#34;+document.body.scrollHeight;
s+=&#34;\r\n网页被卷去的高：&#34;+document.body.scrollTop;
s+=&#34;\r\n网页被卷去的左：&#34;+document.body.scrollLeft;
s+=&#34;\r\n网页正文部分上：&#34;+window.screenTop;
s+=&#34;\r\n网页正文部分左：&#34;+window.screenLeft;
s+=&#34;\r\n屏幕分辨率的高：&#34;+window.screen.height;
s+=&#34;\r\n屏幕分辨率的宽：&#34;+window.screen.width;
s+=&#34;\r\n屏幕可用工作区高度：&#34;+window.screen.availHeight;
s+=&#34;\r\n屏幕可用工作区宽度：&#34;+window.screen.availWidth;
alert(s);
</script>
</body>
</textarea><br/><div class="UBBPanel"><div class="UBBTitle"><img src="http://www.xyhot.com/images/html.gif" style="margin:0px 2px -3px 0px"> HTML代码</div><div class="UBBContent"><TEXTAREA rows="8" id="temp25569">
<body>
<script type=&#34;text/javascript&#34;>
//如果使用DTD申明，请注意document.documentElement与document.body的兼容处理
var s=&#34;&#34;;
s+=&#34;\r\n网页整体区域宽：&#34;+document.body.clientWidth;
s+=&#34;\r\n网页可见区域高：&#34;+document.documentElement.clientHeight;
//window.innerWidth -firefox;
s+=&#34;\r\n网页可见区域宽：&#34;+document.body.offsetWidth+&#34;(包括边线的宽)&#34;;
s+=&#34;\r\n网页可见区域高：&#34;+document.body.offsetHeight+&#34;(包括边线的高)&#34;;
s+=&#34;\r\n网页正文全文宽：&#34;+document.body.scrollWidth;
s+=&#34;\r\n网页正文全文高：&#34;+document.body.scrollHeight;
s+=&#34;\r\n网页被卷去的高：&#34;+document.body.scrollTop;
s+=&#34;\r\n网页被卷去的左：&#34;+document.body.scrollLeft;
s+=&#34;\r\n网页正文部分上：&#34;+window.screenTop;
s+=&#34;\r\n网页正文部分左：&#34;+window.screenLeft;
s+=&#34;\r\n屏幕分辨率的高：&#34;+window.screen.height;
s+=&#34;\r\n屏幕分辨率的宽：&#34;+window.screen.width;
s+=&#34;\r\n屏幕可用工作区高度：&#34;+window.screen.availHeight;
s+=&#34;\r\n屏幕可用工作区宽度：&#34;+window.screen.availWidth;
alert(s);
</script>
</body>
</TEXTAREA><br/><INPUT onclick="runEx('temp25569')"  type="button" value="运行此代码"/> <INPUT onclick="doCopy('temp25569')"  type="button" value="复制此代码"/><br/> [Ctrl+A 全部选择 提示：你可先修改部分代码，再按运行]</div></div>]]></summary>
	  <link rel="alternate" type="text/html" href="http://www.xyhot.com/default.asp?id=460" /> 
	  <id>http://www.xyhot.com/default.asp?id=460</id> 
  </entry>	
		
</feed>