Archive for February, 2010

Date: February 26th, 2010
Cate: html

<img>圖片標籤接不起來的問題

原因:<img>標籤在"原始碼"的"空白"視為像 &nbsp; 的空格,產生區塊,造成圖片有間隔。為了應應各版本,盡量用CSS取代或<img>標籤要接在一起,前後不要有空隔/斷航,才不會遇到這種鳥問題。
Date: February 26th, 2010
Cate: JS, jQuery

臺灣行政區下拉式選單( jQuery base )

使用jQuery 動態產生 臺灣行政區下拉式選單

Date: February 18th, 2010
Cate: Uncategorized

Javascript 字串的擴充 functions

一些 Javascript 的 String 擴充功能:
Substr
myVar = substr2(myVar, x, y); //Your function
myVar = myVar.substr(x, y); //built-in function
Trim
String.prototype.trim = function(){return
(this.replace(/^[\s\xA0]+/, “”).replace(/[\s\xA0]+$/, “”))}
startsWith
String.prototype.startsWith = function(str)
{return (this.match(“^”+str)==str)}
 endsWith
String.prototype.endsWith = function(str)
{return (this.match(str+”$”)==str)} 
Examples:
var myStr = “  Earth is a beautiful planet  ”;
var myStr2 = myStr.trim();  
//==“Earth is a beautiful planet”;
if (myStr2.startsWith(“Earth”)) // returns TRUE
if (myStr2.endsWith(“planet”)) // returns TRUE
if (myStr.startsWith(“Earth”))
// returns FALSE due to the leading spaces…
if [...]

Date: February 12th, 2010
Cate: JS, jQuery

Simple Image Gallery (jQuery Base)

簡單的 Image Gallary

Date: February 4th, 2010
Cate: JS, 解決小問題

IE 6.0 支援 PNG (jQuery Base)

IE 6跑PNG

Date: February 4th, 2010
Cate: CSS, Referance

CSS系統字參考

odcdesign---( Verdana, Geneva, sans-serif )
odcdesign---( Verdana, Geneva, sans-serif )