<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yellow&#039;s Blog &#187; JavaScript</title>
	<atom:link href="http://www.ffsuper.com/blog/index.php/category/web_front_developer/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ffsuper.com/blog</link>
	<description>It&#039;s my evolution lab...</description>
	<lastBuildDate>Thu, 17 Dec 2009 01:06:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>常用JS+CSS</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/12/16/vertical-center-mask-div/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/12/16/vertical-center-mask-div/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 07:10:38 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Front Developer]]></category>
		<category><![CDATA[Xhtml+CSS]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=147</guid>
		<description><![CDATA[.pop {width:100%;height:100%;position:absolute;left:0;top:0;}
.maskbox {
	  width: 100%;
      height: 100%;
	  position: absolute;
      left: 0;
      top: 0;
      z-index:1000;
      background: #000;
      filter:alpha(opacity=60);     /* IE [...]]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/12/16/vertical-center-mask-div/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS+JS方法去除点击链接,按钮时出现的虚线框</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/07/10/cssjs%e6%96%b9%e6%b3%95%e5%8e%bb%e9%99%a4%e7%82%b9%e5%87%bb%e9%93%be%e6%8e%a5%e6%8c%89%e9%92%ae%e6%97%b6%e5%87%ba%e7%8e%b0%e7%9a%84%e8%99%9a%e7%ba%bf%e6%a1%86/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/07/10/cssjs%e6%96%b9%e6%b3%95%e5%8e%bb%e9%99%a4%e7%82%b9%e5%87%bb%e9%93%be%e6%8e%a5%e6%8c%89%e9%92%ae%e6%97%b6%e5%87%ba%e7%8e%b0%e7%9a%84%e8%99%9a%e7%ba%bf%e6%a1%86/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 08:14:41 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web Front Developer]]></category>
		<category><![CDATA[Xhtml+CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hidefocus]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[onfucus]]></category>
		<category><![CDATA[去除虚线框]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=115</guid>
		<description><![CDATA[      做前台开发时肯定会遇到使用button,a标签的时候，每次点击相关这些标签的时候，我们会经常看到有一个虚线框出现，从视觉效果来看，有虚线框会很刺眼，形象到用户浏览的视觉中心，所以我们有必要将这个刺眼的虚线框去掉。利用google和百度，整理一下相关的方法，方便以后开发当中使用。

    方法一：使用css方法
a {blr:e­xpression(this.onFocus=this.blur())} /*for IE*/
&#160; &#160; &#160; a&#160;{outline:}/*for FireFox*/
      IE浏览器下面还可以使用IE下的私有的html属性：hideFoucs，在标签的结构中加入hidefocus=&#8221;true&#8221;属性。即：
&#60;a href=&#34;http://www.g.cn&#34; hidefocus=&#34;true&#34; title=&#34;谷歌&#34;&#62;谷歌&#60;/a&#62;
    方法二：使用javascript方法：
    通过javascript遍历页面Dom
window.onload=function()
&#160; &#160; &#160;&#160; {
&#160; &#160; &#160; &#160; for(var&#160;i=0; ii&#60;document.links.length; ii++)
&#160; &#160; &#160; &#160; document.links$[$ii$]$.onfocus=function(){this.blur()}
&#160; &#160; &#160;&#160; }
     [...]]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/07/10/cssjs%e6%96%b9%e6%b3%95%e5%8e%bb%e9%99%a4%e7%82%b9%e5%87%bb%e9%93%be%e6%8e%a5%e6%8c%89%e9%92%ae%e6%97%b6%e5%87%ba%e7%8e%b0%e7%9a%84%e8%99%9a%e7%ba%bf%e6%a1%86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript操作css属性的写法</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/07/07/javascript%e6%93%8d%e4%bd%9ccss%e5%b1%9e%e6%80%a7%e7%9a%84%e5%86%99%e6%b3%95/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/07/07/javascript%e6%93%8d%e4%bd%9ccss%e5%b1%9e%e6%80%a7%e7%9a%84%e5%86%99%e6%b3%95/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 06:37:38 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css属性]]></category>
		<category><![CDATA[js]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=109</guid>
		<description><![CDATA[使用js操作css属性和css中的写法不同:
1、对于没有中划线的css属性一般直接使用style.属性名即可；
如：obj.style.margin，obj.style.width，obj.style.left，obj.style.position等。
2、对于含有中划线的css属性，将每个中划线去掉并将每个中划线后的第一个字符换成大写即可；
如：obj.style.marginTop，obj.style.borderLeftWidth，obj.style.zIndex，obj.style.fontFamily等。
这个规律我想大多数的前端开发者也都熟知。对在css中有一个特殊的属性其js使用方法确比较特殊。
因为 float 是javascript的保留字，那怎么在js中书写样式表中的 float 呢？
我们不能直接使用obj.style.float来使用，这样操作是无效的。
其正确的使用方法是为：IE:obj.style.styleFloat，其他浏览器Mozilla(gecko)，ff等用 styleFloat:obj.style.cssFloat。
给个例子让大家好理解：
&#60;div onclick=&#34;alert(this.style.float);this.style.float='left';alert(this.style.float);&#34;&#62;测试1&#60;/div&#62;
&#60;div&#160;onclick=&#34;alert(this.style.float);if(this.style.cssFloat) {this.style.cssFloat='left';}else{this.style.styleFloat='left';}alert(this.style.float);&#34;&#38; gt;测试2&#60;/div&#62;
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/07/07/javascript%e6%93%8d%e4%bd%9ccss%e5%b1%9e%e6%80%a7%e7%9a%84%e5%86%99%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>javascript获取屏幕信息的一些对象</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/07/07/javascript%e8%8e%b7%e5%8f%96%e5%b1%8f%e5%b9%95%e4%bf%a1%e6%81%af%e7%9a%84%e4%b8%80%e4%ba%9b%e5%af%b9%e8%b1%a1/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/07/07/javascript%e8%8e%b7%e5%8f%96%e5%b1%8f%e5%b9%95%e4%bf%a1%e6%81%af%e7%9a%84%e4%b8%80%e4%ba%9b%e5%af%b9%e8%b1%a1/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 06:32:46 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[dom]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[对象]]></category>
		<category><![CDATA[屏幕信息]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=107</guid>
		<description><![CDATA[最近在做华为项目的时候，遇到一个要求能够自适应到从800&#215;600到1280&#215;1024之间多个分辨率的显示效果的要求，这个CSS估计只能做到一部分了，肯定需要Javascript配合来动态修改相关的CSS属性，所以上网查找了一下相关屏幕信息的一些对象，记录一下。
网页可见区域宽：document.body.clientWidth
网页可见区域高：document.body.clientHeight
网页可见区域宽：document.body.offsetWidth (包括边线和滚动条的宽)
网页可见区域高：document.body.offsetHeight(包括边线的宽)
网页正文全文宽：document.body.scrollWidth
网页正文全文高：document.body.scrollHeight
网页被卷去的高：document.body.scrollTop
网页被卷去的左：document.body.scrollLeft
如果是框架网页，取得框架的对应方法是document.documentElement.XXX
网页正文部分上：window.screenTop
网页正文部分左：window.screenLeft
屏幕分辨率的高：window.screen.height
屏幕分辨率的宽：window.screen.width
屏幕可用工作区高度：window.screen.availHeight
屏幕可用工作区宽度：window.screen.availWidth
屏幕设置是：window.screen.colorDepth(位彩色)
屏幕设置：window.screen.deviceXDPI(像素/英寸)
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/07/07/javascript%e8%8e%b7%e5%8f%96%e5%b1%8f%e5%b9%95%e4%bf%a1%e6%81%af%e7%9a%84%e4%b8%80%e4%ba%9b%e5%af%b9%e8%b1%a1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过js解决IE缓存CSS背景图片的BUG解决办法</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/07/02/js-backgroundimagecache/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/07/02/js-backgroundimagecache/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 07:32:57 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[backgroundImageCache]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[背景图片缓存]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=101</guid>
		<description><![CDATA[我们在设计网页的时候会经常用到背景图片。有时候页面已经打开了，这些图片实际上已经download到本地了，但IE还是会试图再次请求下载这些图片，导致页面要加载半天才能载入进来，这样无疑增加Http Requests，容易导致用户浏览的页面表示不够友好，消耗大量服务器的带宽，给服务器带来很大的压力。

下面这段JS代码就是用来解决这个IE的BUG的。 
/**&#160; &#160; 
* bug to fix: Flickering CSS Background Images in IE6&#160; &#160; 
* conditions: when IE’s cache settings are “Every visit to the page” (a common developer’s setting)&#160; &#160; 
**/&#160; &#160; 
if&#160;(/*@cc_on @_jscript_version === 5.6 &#124;&#124; @*/false) {
&#160; &#160; try&#160;{&#160;
&#160; &#160; &#160; &#160; document.execCommand(&#34;BackgroundImageCache&#34;, false, true); 
&#160; &#160; }&#160;catch(err) {}
}
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/07/02/js-backgroundimagecache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IFrame页面内target目标跳转到另一个iframe</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/07/02/iframe%e9%a1%b5%e9%9d%a2%e5%86%85target%e7%9b%ae%e6%a0%87%e8%b7%b3%e8%bd%ac%e5%88%b0%e5%8f%a6%e4%b8%80%e4%b8%aaiframe/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/07/02/iframe%e9%a1%b5%e9%9d%a2%e5%86%85target%e7%9b%ae%e6%a0%87%e8%b7%b3%e8%bd%ac%e5%88%b0%e5%8f%a6%e4%b8%80%e4%b8%aaiframe/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 01:52:16 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[target]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=98</guid>
		<description><![CDATA[项目二期开发基本完成，但是华为接口人觉得之前二期用的Frameset不太合适，现在想用两个Iframe来模拟以前的Frameset（唉&#8230;真能折腾!!!）。没办法，只能重新修改结构了。
今天遇到的问题是如何让在同一页面内的两个Iframe中的链接可以进行跳转。自己做了个尝试，其实也就是两行代码就搞掂了,代码如下:
main.html
&#60;html&#62;
&#60;head&#62;&#60;/head&#62;
&#60;body&#62;
&#60;iframe&#160;id=&#34;links&#34; src=&#34;left.html&#34; scrolling=&#34;no&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&#62;&#60;/iframe&#62;
&#60;br&#62;
&#60;iframe&#160;id=&#34;rightFrame&#34; src=&#34;welcome.html&#34; scrolling=&#34;no&#34; frameborder=&#34;0&#34; width=&#34;100%&#34; height=&#34;100%&#34;&#62;&#60;/iframe&#62;
&#60;/body&#62;
&#60;/html&#62;
left.html
&#60;html&#62;
&#60;body&#62;
&#60;a&#160;href=&#34;#&#34; onclick=&#34;test()&#34;&#62;test&#60;/a&#62;
&#60;/body&#62;
&#60;/html&#62;
js部分
function test(){
var&#160;frameid = parent.document.getElementById(&#34;rightFrame&#34;);
frameid.src = &#34;right.html&#34;;
}
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/07/02/iframe%e9%a1%b5%e9%9d%a2%e5%86%85target%e7%9b%ae%e6%a0%87%e8%b7%b3%e8%bd%ac%e5%88%b0%e5%8f%a6%e4%b8%80%e4%b8%aaiframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>新发现一些国外地址</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/06/27/%e6%96%b0%e5%8f%91%e7%8e%b0%e7%9a%84%e4%b8%80%e4%b8%aa%e5%9b%bd%e5%a4%96%e5%9c%b0%e5%9d%80/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/06/27/%e6%96%b0%e5%8f%91%e7%8e%b0%e7%9a%84%e4%b8%80%e4%b8%aa%e5%9b%bd%e5%a4%96%e5%9c%b0%e5%9d%80/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 03:30:12 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Xhtml+CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[国外技术]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=80</guid>
		<description><![CDATA[http://www.experts-exchange.com/
http://www.ozzu.com/zh/
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/06/27/%e6%96%b0%e5%8f%91%e7%8e%b0%e7%9a%84%e4%b8%80%e4%b8%aa%e5%9b%bd%e5%a4%96%e5%9c%b0%e5%9d%80/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[转]让Iframe自适应高度</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/06/18/%e8%bd%ac%e8%ae%a9iframe%e8%87%aa%e9%80%82%e5%ba%94%e9%ab%98%e5%ba%a6/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/06/18/%e8%bd%ac%e8%ae%a9iframe%e8%87%aa%e9%80%82%e5%ba%94%e9%ab%98%e5%ba%a6/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 03:42:50 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=76</guid>
		<description><![CDATA[在Iframe中显示内容时，如果内容不固定，那么就需要让Iframe来自动适应页面的高度，下面是几种方法：
1.在包含Iframe的页面：
&#60;iframe src=&#34;1.html&#34; width=&#34;80%&#34; height=&#34;100%&#34; name=&#34;Mainv&#34; id=&#34;Mainv&#34; scrolling=&#34;no&#34; marginheight=&#34;0&#34; marginwidth=&#34;0&#34; frameborder=&#34;0&#34; onload=&#34;this.height=this.contentWindow.document.body.scrollHeight&#34;&#62;&#60;/iframe&#62;
这样就可以了
2.在包含Iframe的页面：
&#60;iframe src=&#34;main.asp&#34; width=&#34;557px&#34; height=&#34;100%&#34; name=&#34;Mainv&#34; id=&#34;Mainv&#34; scrolling=&#34;no&#34; marginheight=&#34;0&#34; marginwidth=&#34;0&#34; frameborder=&#34;0&#34; style=&#34;border:#FFFFFF&#34;&#62;&#60;/iframe&#62;
然后在每个要在Iframe中显示的页面上，
&#60;body onload=&#34;parent.document.all.Mainv.height=getTotalHeight();&#34;&#62;
然后在页面底部加入
&#60;div id=&#34;theEnd&#34; style=&#34;position:relative&#34;&#62;&#60;/div&#62;&#60;script language=&#34;JavaScript&#34;&#62;function getTotalHeight(){&#160;&#160; &#160; return document.getElementById(&#34;theEnd&#34;).offsetTop+10;}&#60;/script&#62;
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/06/18/%e8%bd%ac%e8%ae%a9iframe%e8%87%aa%e9%80%82%e5%ba%94%e9%ab%98%e5%ba%a6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用javascript中reload方法实现刷新iframe</title>
		<link>http://www.ffsuper.com/blog/index.php/2009/06/08/%e7%94%a8javascript%e4%b8%adreload%e6%96%b9%e6%b3%95%e5%ae%9e%e7%8e%b0%e5%88%b7%e6%96%b0iframe/</link>
		<comments>http://www.ffsuper.com/blog/index.php/2009/06/08/%e7%94%a8javascript%e4%b8%adreload%e6%96%b9%e6%b3%95%e5%ae%9e%e7%8e%b0%e5%88%b7%e6%96%b0iframe/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 08:46:00 +0000</pubDate>
		<dc:creator>Yellow</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[reload()]]></category>

		<guid isPermaLink="false">http://www.ffsuper.com/blog/?p=22</guid>
		<description><![CDATA[js中一般可通过reload()方法实现刷新iframe
方案一:用iframe的name属性定位
&#60;input onclick=&#34;document.frames('ifrmname').location.reload()&#34; name=&#34;Button&#34; type=&#34;button&#34; value=&#34;Button&#34; /&#62;
或
&#60;input onclick=&#34;document.all.ifrmname.document.location.reload()&#34; name=&#34;Button&#34; type=&#34;button&#34; value=&#34;Button&#34; /&#62;
方案二:用iframe的id属性定位
&#60;input onclick=&#34;ifrmid.window.location.reload()&#34; name=&#34;Button&#34; type=&#34;button&#34; value=&#34;Button&#34; /&#62;
终极方案:当iframe的src为其它网站地址(跨域操作时)
&#60;input onclick=&#34;window.open(document.all.ifrmname.src,'ifrmname','')&#34; name=&#34;Button&#34; type=&#34;button&#34; value=&#34;Button&#34; /&#62;
]]></description>
		<wfw:commentRss>http://www.ffsuper.com/blog/index.php/2009/06/08/%e7%94%a8javascript%e4%b8%adreload%e6%96%b9%e6%b3%95%e5%ae%9e%e7%8e%b0%e5%88%b7%e6%96%b0iframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
