<?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>Azan 黃贊臣 &#187; Javascript</title>
	<atom:link href="http://tommy.ironman.tw/category/program/javascript-program/feed/" rel="self" type="application/rss+xml" />
	<link>http://tommy.ironman.tw</link>
	<description>網頁設計文章的蒐集與整理</description>
	<lastBuildDate>Sun, 18 Dec 2011 15:59:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>靠！twcount統計程式有雷</title>
		<link>http://tommy.ironman.tw/twcount-spam/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=twcount-spam</link>
		<comments>http://tommy.ironman.tw/twcount-spam/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 00:30:41 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[電腦相關]]></category>
		<category><![CDATA[twcount]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3303</guid>
		<description><![CDATA[大家不要上當 這個統計程式藏有一支廣告程式 有嵌入的趕快移除 它會不定時自動跳出一則色情廣告的連結 用Google檢查元素後發現，就是twcount網站 而且無法關閉 點關閉也會強迫轉往該色情網站 重點是它竟然還寫 "網站所有資料全部免費提供" 這是甚麼意思阿，讓不了解的人誤會那就糟了 這是我擷圖後放到Flickr的 它的彈出視窗裡面有寫如下語法： &#60;img src="http://s1.twcount.com/welcome.jpg" href="javascript:void(0)" title="cover" onclick="var lkistbvkp=window.open('http://www.sexdvd2000.com/index.php?id=i18858604', 'jjkrebmz','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes, resizable=yes,width=1280,height=800');lkistbvkp.blur(); document.getElementById('eipyuknjqaz').style.display='none'; document.getElementById('dfekgtivbsw').style.display='none';"&#62; 有安裝的趕快移除吧，要放色情廣告都不通知的，實在太狡猾了！]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/twcount-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>受保護的文章：自訂ckeditor工具列工具</title>
		<link>http://tommy.ironman.tw/ckeditor-custom-toolbar/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ckeditor-custom-toolbar</link>
		<comments>http://tommy.ironman.tw/ckeditor-custom-toolbar/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 17:51:49 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ckeditor]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3243</guid>
		<description><![CDATA[受保護的文章不會產生摘要。]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/ckeditor-custom-toolbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>可以在前端實現的幾個地理位置小功能</title>
		<link>http://tommy.ironman.tw/can-be-achieved-in-front-of-a-small-number-of-geographical-features/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=can-be-achieved-in-front-of-a-small-number-of-geographical-features</link>
		<comments>http://tommy.ironman.tw/can-be-achieved-in-front-of-a-small-number-of-geographical-features/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 05:17:44 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Google Gears]]></category>
		<category><![CDATA[google maps]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[YQL]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3220</guid>
		<description><![CDATA[原文網址：http://www.oncoding.cn/2010/geo-location-frontend/ 在Smashing Magazine上看到這篇Entering The Wonderful World of Geo Location，介紹了獲取並處理用戶地理位置的應用和方法，很有意思。結合原文的內容，加上之前的一些應用，整理了幾個可以完全在前端實現的地理位置相關小功能。 1.通過IP獲取用戶位置 很多時候需要通過IP判斷用戶的位置，通常的辦法是通過自己的後臺程式查詢資料庫得到。如果用戶位置只是應用在前端，或者有其他的特殊原因(比如，懶:)，也有一些其他辦法來快速的獲取用戶位置。 maxmind.com提供了一個服務，通過引入一個js檔(http://j.maxmind.com/app/geoip.js)，可以把他判斷到的用戶的國家、城市、經緯度等資訊加入到頁面中來。下面是從青島訪問這個js檔返回的內容： 我們就可以利用這些資訊做很多東西了：DEMO 另外，騰訊也有一個類似的介面，位址為 http://fw.qq.com/ipaddress，可以得到訪問者的省、市資訊，返回的格式如下： 具體的應用可以看這裏： 斷橋殘雪WordPress天氣插件 2.W3C共用位置介面 HTML5加入了的貢獻地理位置的瀏覽器API介面，目前firefox3.5等瀏覽器已經支援這一功能。 用法： 看 DEMO 3. Google Gears 的 Geolocation API Google Gears是主要提供本地存儲功能的瀏覽器擴展，新版本的Gears中，加入了判斷用戶地理位置的API，通過IP、WIFI熱點等判斷位置。不過Gears的使用似乎並不太廣泛(Chrome內置了Gears，其他瀏覽器需要安裝)，國內的地理位置資訊也不夠豐富，所以這個應用目前只可作為參考。 使用Gears的基本方法看這裏，引入gears_init.js，使用Geolocation API的程式為： 更多內容參考這篇文章：使用Gears獲取當前地理位置，以及DEMO。 4.逆經緯度解析 通過瀏覽器API等方式得到經緯度後，有時需要得到對應的城市名，這就是逆經緯度解析。 google maps api提供了一些經緯度解析方法，如果我們不想引入龐大的api，可以直接使用他的請求位址，通過jsonp方式得到google的經緯度解析資料。jsonp請求位址形式為： http://ditu.google.cn/maps/geo? output=json&#38;oe=utf-8&#38;q=緯度%2C經度 &#38;key=你申請到的key &#38;mapclient=jsapi&#38;hl=zh-CN&#38;callback=myfunction 參數q為經緯度，參數callback為回調函數名。 可以看下這個位址的返回結果，資料非常豐富，並且還是中文的： Yahoo提供的介面 雅虎提供了一些經緯度查詢介面，可以使用YQL查詢。 查詢語句為： 用法： // 08 encodeURIComponent(yql)+'&#038;format=json&#038;diagnostics='+ 09 'false&#038;callback='+callback; 10 11 [...]]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/can-be-achieved-in-front-of-a-small-number-of-geographical-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3種jQuery UI Dialog取值、賦值的範例</title>
		<link>http://tommy.ironman.tw/3-jquery-ui-dialog-get-value-put-value-sample/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=3-jquery-ui-dialog-get-value-put-value-sample</link>
		<comments>http://tommy.ironman.tw/3-jquery-ui-dialog-get-value-put-value-sample/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 04:54:45 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3212</guid>
		<description><![CDATA[由於使用jQuery UI Dialog時，必須將頁面上的值傳送到隱藏的Dialog表單，通常使用時都是在這裡出錯，例如取不到列表上的值，或是取值方法不對，或是取到值卻放不進隱藏表單的input欄位，這樣就無法執行寫入或更新了。 http://jquery.gogogogogogogogogo.com/LoadListTest.php 使用jquery.tablesorter.pager排序 http://jquery.gogogogogogogogogo.com/modiTitle.php http://jquery.gogogogogogogogogo.com/putValueInDialog.php 參考資料： http://www.oncoding.cn/2009/jquery-input-value/]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/3-jquery-ui-dialog-get-value-put-value-sample/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解決圖層被Flash擋住的終極方法</title>
		<link>http://tommy.ironman.tw/layout-flash-wmode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=layout-flash-wmode</link>
		<comments>http://tommy.ironman.tw/layout-flash-wmode/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 08:10:30 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wmode]]></category>
		<category><![CDATA[擋住]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=3199</guid>
		<description><![CDATA[如果網頁上有 Flash 的話，往往 Flash 會把彈出的圖層或是使用jQuery dialog彈出的視窗給擋住，(FF除外，IE6，7，8均出現被擋情況) 解決辦法就是給Flash設置透明的參數：wmode="transparent"。 並在 embed 標籤中設置 wmode="transparent" 如果使用 AC_FL_RunContent，可以加多一對參數 'wmode','transparent' 即可。 如： 如果還是有問題，可以嘗試給 Flash 外面增加一個 DIV 標籤，並給他設置 z-index:0; 的樣式即可。]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/layout-flash-wmode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>超棒的js framework 線上測試網站jsFiddle</title>
		<link>http://tommy.ironman.tw/js-framework-jsfiddle-web2-0/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=js-framework-jsfiddle-web2-0</link>
		<comments>http://tommy.ironman.tw/js-framework-jsfiddle-web2-0/#comments</comments>
		<pubDate>Sat, 28 Aug 2010 03:34:13 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[線上工具]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jsFiddle]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=2946</guid>
		<description><![CDATA[剛剛在 jQuery 台灣 看到有同好用jsFiddle當測試平台，分享他的開發心得，本來還一頭霧水，不曉得這是什麼東東，後來線上查了一下才知道，jsFiddle真是一個好物耶，這個線上測試網站有10幾種javascript framework與版本，例如Mootools、jQuery、Prototype、YUI、Glow、Vanilla、Dojo、Processing.js、ExtJS、Raphael等，都可以直接在線上輸入HTML+javascript+CSS程式碼測試，右下方就會顯示結果，並且可以將它存檔起來，分享給其他開發者看，之後也可以修改更新，實在是一個相當方便的線上測試工具。 網址：http://jsfiddle.net/ 使用後還可以嵌入你的網站內供其他人直接測試： 之後還可以回到原網站查看或更新，按Update就會更新一個版本，每個版本都可以保存起來： http://jsfiddle.net/EYBrR/1/ http://jsfiddle.net/EYBrR/2/ http://jsfiddle.net/EYBrR/3/ http://jsfiddle.net/EYBrR/4/ 這裡有網友寫得更詳細，可以過去看看： http://www.dotblogs.com.tw/hatelove/archive/2010/03/28/jsfiddle.aspx]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/js-framework-jsfiddle-web2-0/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>使用外部連結載入Google Analytics的分析代碼</title>
		<link>http://tommy.ironman.tw/include-google-analytics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=include-google-analytics</link>
		<comments>http://tommy.ironman.tw/include-google-analytics/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 07:55:39 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Google Analytics]]></category>
		<category><![CDATA[include]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=2928</guid>
		<description><![CDATA[Google Analytics 一般都是網站流量比較常用的分析工具，但依據官方所提供的分析代碼是建議每一頁放入如下的javascript程式，但如果直接在每一頁放入它的代碼，日後需要更新或維護代碼時，就會造成工作量的增加，因為放了多少頁就要改多少頁，一般較常用的方法就是先在每一頁置入一個Server Side的include語法， 例如： 再將所需要的.js檔放在這個include頁面。 例如將下列代碼存成一個叫做ga.js檔 再將它用這樣： 放到AppMeta.php頁面內 Google Analytics 的追蹤代碼： 但安裝好後我實際測試，用Google Analytics檢查時，它卻說"我們無法驗證您的網站：未安裝追蹤"。 奇怪，明明就有將他的代碼另存成ga.js也上傳到主機好了，為何它說找不到呢? 一般我們載入js函式庫如jQuery函式庫等也是這樣就好了阿，不知是Google Analytics的js寫法不同的關係還是什麼，要生效就一定要在切換到程式碼檢視時，這段代碼一定必須在HTML Code中看得見。 所以就將Google Analytics 的追蹤代碼直接寫在AppMeta.php的頁面上就好了，這樣也是只需改一頁就好，增加日後維護彈性。 因此官方也有建議，如果是php技術，可以用include方式引入以保持日後維護的彈性， For any PHP pages, put the following code in a file (for example, analyticstracking.php) and upload it to your site. Then, add the following line to each template page immediately after the opening [...]]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/include-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>受保護的文章：Ajax Push – 創造即時聊天室</title>
		<link>http://tommy.ironman.tw/ajax-push/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ajax-push</link>
		<comments>http://tommy.ironman.tw/ajax-push/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 01:46:10 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ajax Push]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=2675</guid>
		<description><![CDATA[受保護的文章不會產生摘要。]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/ajax-push/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一用就愛上的中文假文產生器(MoreText)</title>
		<link>http://tommy.ironman.tw/moretext-js/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=moretext-js</link>
		<comments>http://tommy.ironman.tw/moretext-js/#comments</comments>
		<pubDate>Mon, 17 May 2010 09:20:10 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[moretext]]></category>
		<category><![CDATA[亂數]]></category>
		<category><![CDATA[假文]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=2288</guid>
		<description><![CDATA[這個功能還不賴，是台灣人寫的，用在網頁製作時，需要在頁面填充一些看似有用卻又不是真的句子，以前要讓客戶看頁面前，都是上網抓一些其他相關網站的文章，再跟客戶討論版面，但這樣其實不太好，萬一讓原文章擁有者發現，以為我們是要盜用他們的創作，那就糗了。 這是一個jQuery 的外掛，使用時，只要在頁內載入這兩行Javascript 再到要放假文的元素加入一個class="lipsum()"就有效了 例如：&#60;span class="lipsum()"&#62;&#60;/span&#62; 這樣它就自動會塞假文到這個區域標簽中了 ()也可以不加，如果有加()並在()中有填入1~100之間的整數，意思是要顯示幾句假文，不填預設是1句 喜歡的話可以到他的官方網站看，有更詳細的說明： 官方網站：MORETEXT API說明：http://more.handlino.com/api]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/moretext-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>加入我的最愛，支援Firefox、IE</title>
		<link>http://tommy.ironman.tw/add-to-my-bookmark/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=add-to-my-bookmark</link>
		<comments>http://tommy.ironman.tw/add-to-my-bookmark/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 14:03:31 +0000</pubDate>
		<dc:creator>Azan</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[favorite]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://tommy.ironman.tw/?p=1863</guid>
		<description><![CDATA[以往的加入我的最愛都只支援微軟的IE， 目前這個JS支援IE與Firefox 範例預覽：http://tommy.ironman.tw/Sample_Page/add-to-my-bookmark.html 文章來源：這裡]]></description>
		<wfw:commentRss>http://tommy.ironman.tw/add-to-my-bookmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

