Flash plugin and Google Chrome (Linux)
How to Enable Flash Support in Google Chrome in Ubuntu
How do I get Java support on Google Chrome in Linux?
2011年12月21日 星期三
2010年6月27日 星期日
2010年1月13日 星期三
CSS Position
CSS Position 位置
http://css.1keydata.com/tw/position.php
CSS 排版觀念:Position
http://blog.blueshop.com.tw/dplayerd/archive/2008/10/09/57324.aspx
[CSS] IE6 模擬 position:fixed 純 CSS 解法
http://www.jaceju.net/blog/?p=577
http://css.1keydata.com/tw/position.php
CSS 排版觀念:Position
http://blog.blueshop.com.tw/dplayerd/archive/2008/10/09/57324.aspx
[CSS] IE6 模擬 position:fixed 純 CSS 解法
http://www.jaceju.net/blog/?p=577
2010年1月7日 星期四
clientHeight、offsetHeight 和 scrollHeight
四種瀏覽器對 document.body 的 clientHeight、offsetHeight 和 scrollHeight 的解釋
clientHeight 大家對 clientHeight 都沒有什麼異議,都認為是內容可視區域的高度,也就是說頁面瀏覽器中可以看到內容的這個區域的高度,一般是最後一個工具條以下到狀態欄以上的這個區域,與 頁面內容無關。
offsetHeight IE、Opera 認為 offsetHeight = clientHeight + 滾動條 + 邊框。 NS、FF 認為 offsetHeight 是網頁內容實際高度,可以小於 clientHeight。
scrollHeight IE、Opera 認為 scrollHeight 是網頁內容實際高度,可以小於 clientHeight。 NS、FF 認為 scrollHeight 是網頁內容高度,不過最小值是 clientHeight。
MSDN BODY Element | body Object
clientHeight 大家對 clientHeight 都沒有什麼異議,都認為是內容可視區域的高度,也就是說頁面瀏覽器中可以看到內容的這個區域的高度,一般是最後一個工具條以下到狀態欄以上的這個區域,與 頁面內容無關。
offsetHeight IE、Opera 認為 offsetHeight = clientHeight + 滾動條 + 邊框。 NS、FF 認為 offsetHeight 是網頁內容實際高度,可以小於 clientHeight。
scrollHeight IE、Opera 認為 scrollHeight 是網頁內容實際高度,可以小於 clientHeight。 NS、FF 認為 scrollHeight 是網頁內容高度,不過最小值是 clientHeight。
MSDN BODY Element | body Object
2009年8月12日 星期三
2009年7月8日 星期三
2009年6月15日 星期一
CSS 排版
開始工作了 有點懶的說...
很久沒動腦 結果很快就想睡或是精神不集中= =+
現在剛開始指派的工作是要把Opera上面的widget給修改
所以又開始看 Javascript 和 CSS 也找到一些有趣的東西
放上來作為以後的參考
標準 ─ HTML & CSS
這個和不同瀏覽器的排版有點關係,可以參考其中說明的部份
CSS語法教學
這裡有基本的CSS教學 這個網站和SQL語法教學是同一個網站來源
都是由1Keydata.com所提供的 適合初學者和老是忘東忘西的工程師XD
解決下拉式選單覆蓋圖層的問題
之前做系統的時候就有發現 dropdown list都會跑到最上層
用DIV怎麼樣也蓋不掉 原來那是IE的問題 = =+
以前都沒什麼空去查解法 想不到畢業之後查資料跑出來了~
從月曆表選擇某日點選並輸出至指定的表單元件裡
這個和工作沒關係 純粹是我想要自己玩的東西用到的功能
很久沒動腦 結果很快就想睡或是精神不集中= =+
現在剛開始指派的工作是要把Opera上面的widget給修改
所以又開始看 Javascript 和 CSS 也找到一些有趣的東西
放上來作為以後的參考
標準 ─ HTML & CSS
這個和不同瀏覽器的排版有點關係,可以參考其中說明的部份
CSS語法教學
這裡有基本的CSS教學 這個網站和SQL語法教學是同一個網站來源
都是由1Keydata.com所提供的 適合初學者和老是忘東忘西的工程師XD
解決下拉式選單覆蓋圖層的問題
之前做系統的時候就有發現 dropdown list都會跑到最上層
用DIV怎麼樣也蓋不掉 原來那是IE的問題 = =+
以前都沒什麼空去查解法 想不到畢業之後查資料跑出來了~
從月曆表選擇某日點選並輸出至指定的表單元件裡
這個和工作沒關係 純粹是我想要自己玩的東西用到的功能
2009年6月1日 星期一
iframe javascript interaction
refresh an iframe by JavaScript from the parent page
reload function parameter:
false - Reloads the page from the browser cache. Default.
true - Reloads the page from the server.
solution from Re: Refresh iframe by marss
Calling Javascript between IFRAME and Parent frame
1. written in parent, called from within iframe:
2. witten in iframe, called from within the parent:
(Added @ 2009-06-01)The following is read from Accessing a javascript function in a nested iframe in IE, tested OK in IE, Firefox and Chrome
NOTE: javascript interaction between 2 windows
Read Call parent window's javascript function from child window OR passing data from child window to parent window in javascript by chiragrdarji
http://topic.csdn.net/u/20080922/13/ab72e9b1-f42a-411e-a742-a7c75e592965.html
var f = document.getElementById('iframe1');
f.contentWindow.location.reload(true);
f.contentWindow.location.reload(true);
reload function parameter:
false - Reloads the page from the browser cache. Default.
true - Reloads the page from the server.
solution from Re: Refresh iframe by marss
Calling Javascript between IFRAME and Parent frame
1. written in parent, called from within iframe:
//for firefox OK! but not all browser
parent.function_name();
parent.function_name();
2. witten in iframe, called from within the parent:
top.frames[name].function_name();
(Added @ 2009-06-01)The following is read from Accessing a javascript function in a nested iframe in IE, tested OK in IE, Firefox and Chrome
document.getElementsByTagName('iframe')[0].function_name();
NOTE: javascript interaction between 2 windows
Read Call parent window's javascript function from child window OR passing data from child window to parent window in javascript by chiragrdarji
//use element object directly
parent.document.getElementById(id)
parent.document.getElementById(id)
http://topic.csdn.net/u/20080922/13/ab72e9b1-f42a-411e-a742-a7c75e592965.html
2009年5月19日 星期二
Webkit on windows
1. Installing the Developer Tools
VS 2005 Team Suite or VS 2005 Express
Cygwin
QuickTime SDK
2. Getting WebKit
You can download the nightly builds from WebKit Nightly Builds, snapshot of the WebKit source tree, or SVN.
You will need to switch some libraries, too. Read this from A Redistributable WebKit by Brent @ http://lwat.blogspot.com. The files are the latest releases provided by the author.
You should also download the WebKit Support Libraries. Read here for more information.
Put the extracted files to WebKitLibraries\win
After you switch the libraries, the built browser will be slightly different from the Apple Safari.(Of course, you change the libraries)
Type the command to update the WebKit tree in cygwin
3. Building WebKit
Open Webkit.sln or using cygwin by following the steps of tutorial to build the webkit project.
If you switched the libraries in Step 2, you need to reference here to modify your own source codes. You need to modify the reference of those proprietary libraries.
Reference
The WebKit Open Source Project
A Redistributable WebKit
Windows版webkit+cairo編譯步驟
Building on Windows
VS 2005 Team Suite or VS 2005 Express
Cygwin
QuickTime SDK
2. Getting WebKit
You can download the nightly builds from WebKit Nightly Builds, snapshot of the WebKit source tree, or SVN.
You will need to switch some libraries, too. Read this from A Redistributable WebKit by Brent @ http://lwat.blogspot.com. The files are the latest releases provided by the author.
You should also download the WebKit Support Libraries. Read here for more information.
Put the extracted files to WebKitLibraries\win
After you switch the libraries, the built browser will be slightly different from the Apple Safari.(Of course, you change the libraries)
Type the command to update the WebKit tree in cygwin
$ WebKit/WebKitTools/Scripts/update-webkit
3. Building WebKit
Open Webkit.sln or using cygwin by following the steps of tutorial to build the webkit project.
If you switched the libraries in Step 2, you need to reference here to modify your own source codes. You need to modify the reference of those proprietary libraries.
Reference
The WebKit Open Source Project
A Redistributable WebKit
Windows版webkit+cairo編譯步驟
Building on Windows
2009年5月15日 星期五
AJAX security issue
Cross domain AJAX access problem.
神鵰蝦jck11 - AJAX的安全性問題[筆記]
深度探索 Javascript跨域和Ajax跨域解决方案 by Mr.Crazy
mozilla developer center - HTTP access control
神鵰蝦jck11 - AJAX的安全性問題[筆記]
深度探索 Javascript跨域和Ajax跨域解决方案 by Mr.Crazy
mozilla developer center - HTTP access control
2009年3月25日 星期三
CSS selectors
I just read the ">" and "+" symbol in CSS. So I found some reference to understand how it works. If the simple example is too simple to understand, please reference the hyperlinks.
wide range selectors
type selectors(element selectors)
class selectors
ID selectors
descendant selectors
child selectors
NOTE: not supported by Windows Internet Explorer 5, 5.5 and 6
Adjacent sibling selectors
Attribute selectors
Pseudo-classes
Pseudo-elements
Reference:
Selectutorial - CSS selectors
wide range selectors
h1, h2, h3, h4 { text-align: center; }
.highlight p, .highlight ul { margin-left: 10px; }
#main p { padding-top: 10px; }
.highlight p, .highlight ul { margin-left: 10px; }
#main p { padding-top: 10px; }
type selectors(element selectors)
h1 { text-align: center; }
class selectors
/*simple class selector*/
.big { text-align: center; }
<p class="big">This is some text</p>
/*combining class and type selectors*/
p.big { color: blue; }
div.big { color: red; }
/*combining multiple classes*/
.big { font-weight: bold; }
.indent { padding-left: 2px; }
<p class="big indent">
.big { text-align: center; }
<p class="big">This is some text</p>
/*combining class and type selectors*/
p.big { color: blue; }
div.big { color: red; }
/*combining multiple classes*/
.big { font-weight: bold; }
.indent { padding-left: 2px; }
<p class="big indent">
ID selectors
#navigation { width: 50%; color: #333; }
div#navigation { width: 50%; color: #333; }
div#navigation { width: 50%; color: #333; }
descendant selectors
p span { color: red; }
<p>This is a <span>test</span></p>
<p>This is a <span>test</span></p>
child selectors
p > span { color: red; }
<p>This is a <span>test</span></p>
<span>outside p element test</span>
<p>This is a <span>test</span></p>
<span>outside p element test</span>
NOTE: not supported by Windows Internet Explorer 5, 5.5 and 6
Adjacent sibling selectors
p + span { color: red; }
<p>This is a <span>test</span></p>
<span>outside p element test</span>
NOTE: not supported by Windows Internet Explorer 5, 5.5 and 6<p>This is a <span>test</span></p>
<span>outside p element test</span>
Attribute selectors
input[type=text] { width: 50%; }
<input type="text" value="text" />
<input type="button" value="button" />
NOTE: not supported by Windows Internet Explorer 5, 5.5 and 6<input type="text" value="text" />
<input type="button" value="button" />
Pseudo-classes
/*element hierarchy*/
:first-child
/*hyper link styling*/
:link
:visited
/*mouse over*/
:hover
/*mouse down*/
:active
/*other*/
:focus
:lang(n)
NOTE: not supported by Windows Internet Explorer 5, 5.5 and 6:first-child
/*hyper link styling*/
:link
:visited
/*mouse over*/
:hover
/*mouse down*/
:active
/*other*/
:focus
:lang(n)
Pseudo-elements
/*the first letter or the first line of text appears*/
:first-line
:first-letter
/*before or after an element on the page*/
:before
:after
NOTE: not supported by Windows Internet Explorer 5, 5.5 and 6:first-line
:first-letter
/*before or after an element on the page*/
:before
:after
Reference:
Selectutorial - CSS selectors
2009年3月19日 星期四
Microsoft Expression Web SuperPreview
A cross-browser test platform provided by Microsoft. It can allow you to check your website between Internet Explorer 6 to the native version you installed, and some other browsers you installed locally - Firefox 3.5, Safari 3, Safari 4, etc.
Read the blog for more information.
Related: Expression Web SuperPreview makes cross-browser testing like moist delicious cake
There is another test browser named IETester for IE8 RC1, IE7 IE 6 and IE5.5 on Vista and XP. IETester is a free WebBrowser that allows you to have the rendering and javascript engines.
It is still in development, see its homepage.
Read the blog for more information.
Related: Expression Web SuperPreview makes cross-browser testing like moist delicious cake
There is another test browser named IETester for IE8 RC1, IE7 IE 6 and IE5.5 on Vista and XP. IETester is a free WebBrowser that allows you to have the rendering and javascript engines.
It is still in development, see its homepage.
2009年3月12日 星期四
讓IE6支援PNG透明背景
IE6支援PNG透明背景 CSS設定
最好也最適合的方法就是透過IE的AlphaImageLoader的方法,將alpha效果套入所屬class的png圖檔中,詳細請參考原文說明
在CSS中加入
其他可參考的網頁
http://www.satzansatz.de/cssd/tmp/alphatransparency.html
The PNG problem in Windows Internet Explorer
4種讓IE6支援PNG圖檔透明背景的方法
IE Tester - test IE8 RC1, IE7, IE 6 and IE5.5 on Vista and XP.
最好也最適合的方法就是透過IE的AlphaImageLoader的方法,將alpha效果套入所屬class的png圖檔中,詳細請參考原文說明
在CSS中加入
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png', sizingMethod='scale');
其他可參考的網頁
http://www.satzansatz.de/cssd/tmp/alphatransparency.html
The PNG problem in Windows Internet Explorer
4種讓IE6支援PNG圖檔透明背景的方法
IE Tester - test IE8 RC1, IE7, IE 6 and IE5.5 on Vista and XP.
2009年3月10日 星期二
Get data from weather.com
Get XML data from http://xoap.weather.com/
search for location id
http://xoap.weather.com/search/search?where=[keyword]
get a specific location weather
http://xoap.weather.com/weather/local/[location id]
For more information
You can read Weather XML Data Feed Implementation Guide
TWCi_sdk.zip
從http://xoap.weather.com/解析天氣
search for location id
http://xoap.weather.com/search/search?where=[keyword]
get a specific location weather
http://xoap.weather.com/weather/local/[location id]
For more information
You can read Weather XML Data Feed Implementation Guide
TWCi_sdk.zip
從http://xoap.weather.com/解析天氣
2009年3月6日 星期五
JavaScript Virtual Keyboard
JavaScript Graphical / Virtual Keyboard Interface
Here is the demo:
download the script from here
Here is the demo:
download the script from here
<script type="text/javascript" src="keyboard.js" charset="UTF-8"></script>
<link rel="stylesheet" type="text/css" href="keyboard.css" />
<link rel="stylesheet" type="text/css" href="keyboard.css" />
2009年3月5日 星期四
JavaScript XML node trace
DOMParser
Using JavaScript DOM Parser to create XML Document from XML strings.
XML DOM - The Element Object
Using JavaScript DOM Parser to create XML Document from XML strings.
var doc;//xml dom
// Mozilla and Netscape browsers
if (document.implementation.createDocument) {
var parser = new DOMParser()
doc = parser.parseFromString(xmlstr, "text/xml")
// Internet Explorer
} else if (window.ActiveXObject) {
doc = new ActiveXObject("Microsoft.XMLDOM")
doc.async="false"
doc.loadXML(xmlstr)
}
//doc is dom strucure, using node traverse to access the nodes
// Mozilla and Netscape browsers
if (document.implementation.createDocument) {
var parser = new DOMParser()
doc = parser.parseFromString(xmlstr, "text/xml")
// Internet Explorer
} else if (window.ActiveXObject) {
doc = new ActiveXObject("Microsoft.XMLDOM")
doc.async="false"
doc.loadXML(xmlstr)
}
//doc is dom strucure, using node traverse to access the nodes
XML DOM - The Element Object
2009年3月4日 星期三
JavaScript Regular Expression
Regular Expression in JavaScript
method 1
method 2
NOTE: RegExp Object now supports search(), match(), replace() and split() in String Object. For more detail please reference the hyperlinks.
Reference:
JavaScript RegExp Object Reference
石頭閒語 - Regular Expression (RegExp) in JavaScript
Regular Expression在Javscript下的兩種作法
method 1
var str = "this is a test";
var re = new RegExp("is");
var m = re.exec(str);
if(m) alert(m[1]);
var re = new RegExp("is");
var m = re.exec(str);
if(m) alert(m[1]);
method 2
var str = "this is a test";
var re=/test/gi;
alert(str.replace(regex,"!!!"));
var re=/test/gi;
alert(str.replace(regex,"!!!"));
NOTE: RegExp Object now supports search(), match(), replace() and split() in String Object. For more detail please reference the hyperlinks.
Reference:
JavaScript RegExp Object Reference
石頭閒語 - Regular Expression (RegExp) in JavaScript
Regular Expression在Javscript下的兩種作法
2009年3月3日 星期二
JavaScript window.open
window.open([URL], [window name], [property], [Replace]);
property:
NOTE: Another fullscreen property is only supported by Internet Exploer.
Reference:
Open popup window with open.window method
window.open()的所有參數列表
IE的showModalDialog與FireFox的window.open 父子窗口傳值示例
property:
| Property | Default | Description |
|---|---|---|
| toolbar | no | show the toolbar |
| menubar | no | show the menu bar |
| resizable | no | specifies whether the window can be resized. |
| scrollbars | no | show the scrollbars |
| status | no | show the statusbar |
| directories | no | show the directories bar(links bar) |
| location | no | show the location bar |
| width | auto | specifies width of the new window in pixels |
| height | auto | height of the window in pixels |
| top | auto | specifies window position |
| left | auto | specifies window position |
NOTE: Another fullscreen property is only supported by Internet Exploer.
Reference:
Open popup window with open.window method
window.open()的所有參數列表
IE的showModalDialog與FireFox的window.open 父子窗口傳值示例
2009年2月13日 星期五
JavaScript Event object
Firefox can not use the event object in JavaScript
I often use the first arguments to get the event object.
Some other solutions provided:
解決 FireFox 下[使用event很麻煩] 的問題
Firefox中Javascript使用event對象需要注意的問題
IE和Firefox下event亂談
Reference:
Javascript Madness: Mouse Events - a full test of mouse events in modern browsers
Event Key Codes - pretty useful event key codes
JavaScript Event KeyCode Test Page
MDC - event
I often use the first arguments to get the event object.
obj.onmousedown=function() {
var event = arguments[0];
var x=event.clientX, y=event.clientY;
}
var event = arguments[0];
var x=event.clientX, y=event.clientY;
}
<div onmousedown="_mousedown(event)"></div>
<script type="text/javascript">
function _mousedown(e) {
var x=e.clientX, y=e.clientY;
}
</script>
<script type="text/javascript">
function _mousedown(e) {
var x=e.clientX, y=e.clientY;
}
</script>
Some other solutions provided:
解決 FireFox 下[使用event很麻煩] 的問題
Firefox中Javascript使用event對象需要注意的問題
IE和Firefox下event亂談
Reference:
Javascript Madness: Mouse Events - a full test of mouse events in modern browsers
Event Key Codes - pretty useful event key codes
JavaScript Event KeyCode Test Page
MDC - event
2009年2月10日 星期二
JavaScript Get CSS style
Get the css text or style sheet
reference from How can I get CSS comments with javascript?
Other CSS reference
CSS frquently used attributes
Mozilla CSS Extensions
WebKit CSS Styles
FF 與 IE CSS的區別
CSS 於IE6、IE7、Firefox間的兼容hack
s=document.styleSheets;
for(i=0;i < s[0].cssRules.length;i++){
alert(s[0].cssRules[i].cssText);
}
for(i=0;i < s[0].cssRules.length;i++){
alert(s[0].cssRules[i].cssText);
}
reference from How can I get CSS comments with javascript?
Other CSS reference
CSS frquently used attributes
Mozilla CSS Extensions
WebKit CSS Styles
FF 與 IE CSS的區別
CSS 於IE6、IE7、Firefox間的兼容hack
訂閱:
文章 (Atom)
