﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-hoojo-随笔分类-JavaScript</title><link>http://www.blogjava.net/hoojo/category/49174.html</link><description>学习在于积累：滴水可以石穿！学而不思则罔，思而不学则殆！ </description><language>zh-cn</language><lastBuildDate>Mon, 13 Aug 2012 09:35:03 GMT</lastBuildDate><pubDate>Mon, 13 Aug 2012 09:35:03 GMT</pubDate><ttl>60</ttl><item><title>JavaScript/jQuery、HTML、CSS 构建 Web IM 远程及时聊天通信程序</title><link>http://www.blogjava.net/hoojo/archive/2012/08/13/385360.html</link><dc:creator>hoojo</dc:creator><author>hoojo</author><pubDate>Mon, 13 Aug 2012 01:39:00 GMT</pubDate><guid>http://www.blogjava.net/hoojo/archive/2012/08/13/385360.html</guid><wfw:comment>http://www.blogjava.net/hoojo/comments/385360.html</wfw:comment><comments>http://www.blogjava.net/hoojo/archive/2012/08/13/385360.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hoojo/comments/commentRss/385360.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hoojo/services/trackbacks/385360.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 这篇文章主要介绍用JavaScript和jQuery、HTML、CSS以及用第三方聊天JavaScript（jsjac）框架构建一个BS Web的聊天应用程序。此程序可以和所有连接到Openfire服务器的应用进行通信、发送消息。如果要运行本程序还需要一个聊天服务器Openfire， 以及需要用到Http方式和Openfire通信的第三方库（JabberHTTPBind）。 JabberHTTPB...&nbsp;&nbsp;<a href='http://www.blogjava.net/hoojo/archive/2012/08/13/385360.html'>阅读全文</a><img src ="http://www.blogjava.net/hoojo/aggbug/385360.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hoojo/" target="_blank">hoojo</a> 2012-08-13 09:39 <a href="http://www.blogjava.net/hoojo/archive/2012/08/13/385360.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JavaScript/jQuery WebIM 及时聊天通信工具 本地客户端</title><link>http://www.blogjava.net/hoojo/archive/2012/06/18/381032.html</link><dc:creator>hoojo</dc:creator><author>hoojo</author><pubDate>Mon, 18 Jun 2012 11:04:00 GMT</pubDate><guid>http://www.blogjava.net/hoojo/archive/2012/06/18/381032.html</guid><wfw:comment>http://www.blogjava.net/hoojo/comments/381032.html</wfw:comment><comments>http://www.blogjava.net/hoojo/archive/2012/06/18/381032.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/hoojo/comments/commentRss/381032.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hoojo/services/trackbacks/381032.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: WebIM本地客户端，可以发送表情、调整字体、字体大小、字体颜色、加粗、下划线、斜体等；还支持收缩split条，详情等； 上UI界面，界面还不够专业，需要美工支持，下一期在做优化！   收缩详情   &nbsp; chat.html 代码  &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;&lt;html&g...&nbsp;&nbsp;<a href='http://www.blogjava.net/hoojo/archive/2012/06/18/381032.html'>阅读全文</a><img src ="http://www.blogjava.net/hoojo/aggbug/381032.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hoojo/" target="_blank">hoojo</a> 2012-06-18 19:04 <a href="http://www.blogjava.net/hoojo/archive/2012/06/18/381032.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ext [DDTabPanel、FoodImageField、ImageChooser]扩展组件</title><link>http://www.blogjava.net/hoojo/archive/2012/03/17/372077.html</link><dc:creator>hoojo</dc:creator><author>hoojo</author><pubDate>Fri, 16 Mar 2012 19:09:00 GMT</pubDate><guid>http://www.blogjava.net/hoojo/archive/2012/03/17/372077.html</guid><wfw:comment>http://www.blogjava.net/hoojo/comments/372077.html</wfw:comment><comments>http://www.blogjava.net/hoojo/archive/2012/03/17/372077.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hoojo/comments/commentRss/372077.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hoojo/services/trackbacks/372077.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 开发环境：  System：Windows  WebBrowser：IE6+、Firefox3+  JavaEE Server：tomcat5.0.2.8、tomcat6  IDE：eclipse、MyEclipse 6.5  开发依赖库：  JavaEE5、ext 2.2.2  Email：hoojo_@126.com  Blog：http://blog.csdn.net/IBM_hoojo  ...&nbsp;&nbsp;<a href='http://www.blogjava.net/hoojo/archive/2012/03/17/372077.html'>阅读全文</a><img src ="http://www.blogjava.net/hoojo/aggbug/372077.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hoojo/" target="_blank">hoojo</a> 2012-03-17 03:09 <a href="http://www.blogjava.net/hoojo/archive/2012/03/17/372077.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>jQuery 获取屏幕高度、宽度</title><link>http://www.blogjava.net/hoojo/archive/2012/02/16/370132.html</link><dc:creator>hoojo</dc:creator><author>hoojo</author><pubDate>Thu, 16 Feb 2012 09:45:00 GMT</pubDate><guid>http://www.blogjava.net/hoojo/archive/2012/02/16/370132.html</guid><wfw:comment>http://www.blogjava.net/hoojo/comments/370132.html</wfw:comment><comments>http://www.blogjava.net/hoojo/archive/2012/02/16/370132.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/hoojo/comments/commentRss/370132.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/hoojo/services/trackbacks/370132.html</trackback:ping><description><![CDATA[<p>做手机Web开发做浏览器兼容用到了，所以在网上找了些汇总下。</p> <div id="codeSnippetWrapper"> <div id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">alert($(window).height()); <span style="color: #008000">//浏览器当前窗口可视区域高度 </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">alert($(document).height()); <span style="color: #008000">//浏览器当前窗口文档的高度 </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">alert($(document.body).height());<span style="color: #008000">//浏览器当前窗口文档body的高度 </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">alert($(document.body).outerHeight(<span style="color: #0000ff">true</span>));<span style="color: #008000">//浏览器当前窗口文档body的总高度 包括border padding margin </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">alert($(window).width()); <span style="color: #008000">//浏览器当前窗口可视区域宽度 </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">alert($(document).width());<span style="color: #008000">//浏览器当前窗口文档对象宽度 </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">alert($(document.body).width());<span style="color: #008000">//浏览器当前窗口文档body的高度 </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">alert($(document.body).outerWidth(<span style="color: #0000ff">true</span>));<span style="color: #008000">//浏览器当前窗口文档body的总宽度 包括border padding margin </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">&nbsp;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span style="color: #008000">// 获取页面的高度、宽度</span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none"><span style="color: #0000ff">function</span> getPageSize() {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">var</span> xScroll, yScroll;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">if</span> (window.innerHeight &amp;&amp; window.scrollMaxY) {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        xScroll = window.innerWidth + window.scrollMaxX;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        yScroll = window.innerHeight + window.scrollMaxY;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    } <span style="color: #0000ff">else</span> {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        <span style="color: #0000ff">if</span> (document.body.scrollHeight &gt; document.body.offsetHeight) { <span style="color: #008000">// all but Explorer Mac    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">            xScroll = document.body.scrollWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">            yScroll = document.body.scrollHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        } <span style="color: #0000ff">else</span> { <span style="color: #008000">// Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">            xScroll = document.body.offsetWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">            yScroll = document.body.offsetHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        }</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    }</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">var</span> windowWidth, windowHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">if</span> (self.innerHeight) { <span style="color: #008000">// all except Explorer    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        <span style="color: #0000ff">if</span> (document.documentElement.clientWidth) {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">            windowWidth = document.documentElement.clientWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        } <span style="color: #0000ff">else</span> {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">            windowWidth = self.innerWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        }</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        windowHeight = self.innerHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    } <span style="color: #0000ff">else</span> {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        <span style="color: #0000ff">if</span> (document.documentElement &amp;&amp; document.documentElement.clientHeight) { <span style="color: #008000">// Explorer 6 Strict Mode    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">            windowWidth = document.documentElement.clientWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">            windowHeight = document.documentElement.clientHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">        } <span style="color: #0000ff">else</span> {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">            <span style="color: #0000ff">if</span> (document.body) { <span style="color: #008000">// other Explorers    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">                windowWidth = document.body.clientWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">                windowHeight = document.body.clientHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">            }</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        }</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    }       </pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    <span style="color: #008000">// for small pages with total height less then height of the viewport    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">if</span> (yScroll &lt; windowHeight) {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        pageHeight = windowHeight;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    } <span style="color: #0000ff">else</span> {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        pageHeight = yScroll;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    }    </pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    <span style="color: #008000">// for small pages with total width less then width of the viewport    </span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">if</span> (xScroll &lt; windowWidth) {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        pageWidth = xScroll;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    } <span style="color: #0000ff">else</span> {</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">        pageWidth = windowWidth;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    }</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">    arrayPageSize = <span style="color: #0000ff">new</span> Array(pageWidth, pageHeight, windowWidth, windowHeight);</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">    <span style="color: #0000ff">return</span> arrayPageSize;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">}</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">&nbsp;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span style="color: #008000">// 滚动条</span></pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: white; text-align: left; border-bottom-style: none">document.body.scrollTop;</pre><!--CRLF--><pre style="padding-right: 0px; padding-left: 0px; font-size: 10pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; text-align: left; border-bottom-style: none">$(document).scrollTop();</pre><!--CRLF--></div></div><img src ="http://www.blogjava.net/hoojo/aggbug/370132.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/hoojo/" target="_blank">hoojo</a> 2012-02-16 17:45 <a href="http://www.blogjava.net/hoojo/archive/2012/02/16/370132.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>