<?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/">
	<channel>
		<title>JavaScript</title>
		<link>http://cherryphilip.365d.info/forum-f3/topic-t1.htm</link>
		<description></description>
		<lastBuildDate>Sun, 09 Nov 2008 16:16:56 GMT</lastBuildDate>
		<ttl>10</ttl>
		<image>
			<title>JavaScript</title>
			<url>http://illiweb.com/fa/prosilver/site_logo.gif</url>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t1.htm</link>
		</image>
		<item>
			<title>230個，常用網頁使用的JS技巧收集 220</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t21.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>220.彈出新頁面，關閉舊頁面，不彈出提示框

var w=screen.availWidth-10;



   var h=screen.availHeight-10;

   var swin=window.open(&quot;/message_management.jsp&quot;,&quot;BGSMbest&quot;,&quot;scrollbars=yes,status,location=0,menubar=0,toolbar=0,resizable=no,top=0,left=0,height=&quot;+h+&quot;,width=&quot;+w);

   window.opener=null;

   window.close();



221.能輸入的下拉框

&lt;span&gt;

&lt;input name=&quot;Department1&quot; id=&quot;Department1&quot; style=&quot;  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:16:56 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t21.htm#21</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t21.htm</guid>
		</item>
		<item>
			<title>230個，常用網頁使用的JS技巧收集 201</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t20.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>201.將url轉化為16進制形式

var ret = '';

for(var i=0; i &lt; str.length; i++)

{

  var ch = str.charAt(i);

  var code = str.charCodeAt(i);



  if(code &lt; 128 &amp;&amp; ch != '[' &amp;&amp; ch != '\'' &amp;&amp; ch != '=')

  {

   ret += ch;

  }

  else 

  {

   ret += &quot;[&quot; + code.toString(16) + &quot;]&quot;;

  }

}

return ret;



202.打開新的窗口並將新打開的窗口設置為活動窗口

var newWin=window.open(&quot;xxxx&quot;);

newWin.focus();



203.容錯腳本

JS中遇到腳本錯誤時不做任何操作:window.&#111;nerr&#111;r  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:16:38 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t20.htm#20</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t20.htm</guid>
		</item>
		<item>
			<title>230個，常用網頁使用的JS技巧收集 191</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t19.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>191.加注音

&lt;RUBY&gt;

基準文本

&lt;RT&gt;注音文本

&lt;/RUBY&gt;//



192.加刪除線

&lt;S&gt;此文本將帶刪除線顯示。&lt;/S&gt;



193.取frame中的event事件

document.frames(&quot;workspace&quot;).event.keyCode



194.是彈出方法的定義

String.prototype.trim=function()

{

return this.replace(/(^\s*)|(\s*&#36;)/g、&quot;&quot;);

}

alert(&quot;  &quot;.trim)



195.防止網頁被包含

if (window != window.top)

top.location.href  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:16:03 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t19.htm#19</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t19.htm</guid>
		</item>
		<item>
			<title>230個，常用網頁使用的JS技巧收集 171</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t18.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>171.設置和使用cookie

&lt;HTML&gt;

&lt;BODY&gt;

設置與讀取 cookies...&lt;BR&gt;

寫入cookie的值&lt;input type=text name=gg&gt;

&lt;INPUT TYPE = BUTTON Value = &quot;設置cookie&quot; &#111;nClick = &quot;Set()&quot;&gt;

&lt;INPUT TYPE = BUTTON Value = &quot;讀取cookie&quot; &#111;nClick = &quot;Get()&quot;&gt;&lt;BR&gt;

&lt;INPUT TYPE = TEXT NAME = Textbox&gt;

&lt;/BODY&gt;

&lt;SCR&#73;PT LANGUAGE=&quot;JavaScr&#105;pt&quot;&gt;

function Set()

{

var Then  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:15:13 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t18.htm#18</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t18.htm</guid>
		</item>
		<item>
			<title>230個，常用網頁使用的JS技巧收集 101</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t17.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>101.餅圖

&lt;style&gt;

v\:*     { behavior: url(#default#VML) }

o\:*     { behavior: url(#default#VML) }

.shape    { behavior: url(#default#VML) }

&lt;/style&gt;

&lt;scr&#105;pt language=&quot;javascr&#105;pt&quot;&gt;

function show(pie)

{

pie.strokecolor=pie.fillcolor;

pie.strokeweight=10;

div1.innerHTML=&quot;&lt;font size=2 color=red&gt; &quot; + pie.id +&quot;&lt;/font&gt; &lt;font size=2&gt;&quot; + pie.title + &quot;&lt;/font&gt;&quot;;

}

function hide(pie)

{

pie.strokecolor=&quot;white&quot;;

pie.strokeweight=1;

div1.innerHTML=&quot;&quot;;

}

&lt;/scr&#105;pt&gt;

&lt;/head&gt;

&lt;body&gt;

&lt;v:group  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:14:27 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t17.htm#17</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t17.htm</guid>
		</item>
		<item>
			<title>230個，常用網頁使用的JS技巧收集 51</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t16.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>51.向檔案中寫內容

&lt;%@ page import=&quot;java.io.*&quot; %&gt;

&lt;%

String str = &quot;print me&quot;;

//always give the path from root. This way it almost always works.

String nameOfTextFile = &quot;/usr/anil/imp.txt&quot;;

try

{ 

  PrintWriter pw = new PrintWriter(new FileOutputStream(nameOfTextFile));

  pw.println(str);

  //clean up

  pw.close();

}

catch(IOException e)

{

  out.println(e.getMessage());

}

%&gt;



52.先讀檔案再寫檔案

&lt;%@  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:12:07 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t16.htm#16</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t16.htm</guid>
		</item>
		<item>
			<title>230個，常用網頁使用的JS技巧收集</title>
			<link>http://cherryphilip.365d.info/forum-f3/topic-t15.htm</link>
			<dc:creator>Admin</dc:creator>
			<description>東西很多慢慢看！請多善用 GOOGLE 的查詢功能！



1.文本框焦點問題

&#111;nBlur:當失去輸入焦點後產生該事件

&#111;nF&#111;cus:當輸入獲得焦點後，產生該檔案

&#79;nchange:當文字值改變時，產生該事件

&#79;nselect:當文字加亮後，產生該檔案

&lt;input type=&quot;text&quot; value=&quot;可酷啦&quot; &#111;nf&#111;cus=&quot;if(value=='可酷啦') {value=''}&quot; &#111;nblur=&quot;if 

(value=='') {value='可酷啦'}&quot;&gt;點擊時文字消失，失去焦點時文字再出現



2.網頁按鈕的特殊顏色

&lt;input  ...</description>
			<category>JavaScript</category>
			<pubDate>Sun, 09 Nov 2008 16:10:12 GMT</pubDate>
			<comments>http://cherryphilip.365d.info/forum-f3/topic-t15.htm#15</comments>
			<guid>http://cherryphilip.365d.info/forum-f3/topic-t15.htm</guid>
		</item>
	</channel>
</rss>