2015年6月29日 星期一

Load new document

顯示當前URL的路徑名

Display the path name of the current URL.

顯示主機名(和端口如果不是80)當前URL的

Display the hostname (and the port if not 80) of the current URL.

顯示當前頁面的完整URL

Display the entire URL of the current page.

switch

SCROLL

Click the button to scroll the document window 300 pixels horizontally and 500 pixels vertically.

mousemove

This example uses the addEventListener() method to attach a "mousemove" event to a div element.

Mouse over the rectangle above, and get the coordinates of your mouse pointer.

mouseDown

This example uses the addEventListener() method to attach a "mousedown" and "mouseup" event to a p element.

Click me.

改變本文文字顏色

Click the text! The mouseDown() function is triggered when the mouse button is pressed down over this paragraph, and sets the color of the text to red. The mouseUp() function is triggered when the mouse button is released, and sets the color of the text to green.

mouseup and mousedown

Press down and release the mouse button over this div element.
123

2015年6月27日 星期六

畫圓

Your browser does not support the HTML5 canvas tag.

畫方

Your browser does not support the HTML5 canvas tag.

2015年6月26日 星期五

檢查窗口開閉



關閉新窗口

使用open()來打開一個新的窗口,close()來關閉新窗口

打開一個新的窗口,並設置其寬度和高度250像素

Open a new window, and resize the width and height to 500px:

偵側瀏覽器窗口大小


2015年6月19日 星期五

HTML5 Canvas

Image    HTML5 Canvas     影像圖片的容量計算方式

2015年6月8日 星期一

添加更多的樣式

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
John Doe 80

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
John Doe 80

不同的樣式不同的表

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
John Doe 80

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
John Doe 80

一個HTML表格有了一個標題

Monthly savings
Month Savings
January $100
February $50

表格跨越多列

Cell that spans two rows:

Name: Bill Gates
Telephone: 555 77 854
555 77 855

表格跨越多行

Cell that spans two columns:

Name Telephone
Bill Gates 555 77 854 555 77 855

2015年6月7日 星期日

獲取的下拉列表選項的數目

There are 0 options in the list.

顯示表單id

The id of the form is:

顯示形式方法

First name:
Last name:

Click "Try it" to display the value of the form method.

顯示輸出目標

First name:
Last name:

Click "Try it" to display the target of the form:

顯示表單名稱

First name:
Last name:

Click "Try it" to display the name of the form:

顯示選項的索引

Select your favorite fruit:

輸出所有選項

Select your favorite fruit:

打開表單內容


表單選擇

Select your favorite fruit:

表單多選

Before you click "Select multiple", you cannot select more than one option (by holding down the Shift or Ctrl key).

After you have clicked "Select multiple", you can.

表單選擇(禁用)


Note: 確認你的選擇

2015年6月6日 星期六

圖片廣告連結



連結

輸入(表格)

A demonstration of how to access a Number field

Click the button to get the number of the number field.
Note: input elements with type="number" are not supported in IE 9 and earlier versions.

no1
no2
no3

A demonstration of how to access a Number field

Click the button to get the number of the number field.
Note: input elements with type="number" are not supported in IE 9 and earlier versions.


輸入編號對象

A demonstration of how to access a Number field

Click the button to get the number of the number field.
Note: input elements with type="number" are not supported in IE 9 and earlier versions.

lastIndexOf()方法

Please locate where 'locate' occurs!.

普通的HTML事件

下面是一些常見的HTML事件的列表:
事件描述
的onchange一個HTML元素已被改變
的onclick用戶點擊一個HTML元素
的onmouseover用戶在一個HTML元素上移動鼠標
的onmouseout用戶從一個HTML元素移動鼠標移開
的onkeydown用戶按下鍵盤鍵
onload事件該瀏覽器已完成加載頁面

person.fullName

Creating and using an object method.

An object method is a function definition, stored as a property value.

Value too small

Value too large

輸入 input

Enter a number and click OK:

If the number is less than 100 or greater than 300, an error message will be displayed.

如果該數小於100或大於300,則顯示錯誤消息

Enter a number and click OK:

If the number is less than 100 or greater than 300, an error message will be displayed.

java and javascript

java

JavaScript

w3cschool

寫入瀏覽器的控制台,使用的console.log_

My First Web Page

My first paragraph.

Activate debugging in your browser (Chrome, IE, Firefox) with F12, and select "Console" in the debugger menu.