Date: February 26th, 2010
Cate: html

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

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

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

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

...... Reading More
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 [...]

...... Reading More
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

...... Reading More
Date: February 4th, 2010
Cate: CSS, Referance

CSS系統字參考

odcdesign---( Verdana, Geneva, sans-serif )
odcdesign---( Verdana, Geneva, sans-serif )
...... Reading More
Date: December 28th, 2009
Cate: JS

CKEditor 的 ToolBar 的快速設定

CKEditor 真是好用
快速設定法:
<script type=”text/javascript”>
    CKEDITOR.config.toolbar_XXXXX =
    [
        ['NewPage', 'Preview'],
        ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Scayt'],
        ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
        ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'],
        ‘/’,
        ['Styles', 'Format'],
        ['Bold', 'Italic', 'Strike'],
        ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
        ['Link', 'Unlink', 'Anchor'],
        ['Maximize', '-', 'About']
    ];
     CKEDITOR.replace(‘Content_3′,
    {
        toolbar: ‘XXXXX’
    [...]

...... Reading More
Date: December 28th, 2009
Cate: ASP.NET

ASP.NET 直接寫出檔案, 並該使用者跳出下載對話框

Response.AppendHeader(“Content-Disposition”, “attachment; filename=” & Server.UrlPathEncode(Filename))
Response.TransmitFile(PathAndFilename)
Filename 記得要用 UrlPathEncode.
附註寫出直接寫出圖檔的方式, 沒測試過, 有空再來試試. 其中 bmp 是 BMP 物件.
Response.ContentType = “image/jpeg”;
Response.AppendHeader(“Content-Disposition”,“attachment; filename=LeftCorner.jpg”);
 
bmp.Save(Response.OutputStream, ImageFormat.Jpeg);
參考網站 http://www.west-wind.com/weblog/posts/76293.aspx

...... Reading More
Date: December 18th, 2009
Cate: ASP.NET, Tip

ASP.NET Constant

以前用PHP常數大部份都會訂一頁專門存變數
換到ASP.NET就把我搞的一頭霧水

...... Reading More
Date: December 16th, 2009
Cate: JS, 解決小問題

IE & Firefox getYear() 共用Function

Firefox 和 IE Date物件的 getYear的定義不同
Firefox取得會比IE少1900

...... Reading More