DC's Life

Programming,Sports etc...


  • 首頁

  • 關於

  • 歸檔

  • 標籤

HTML Form 介紹

發表於 2017-07-26

Form Syntax

HTML 的 <form> 是用來收集使用者輸入的資料,在 form 標籤內會包含許多 Form elements,Form elements 是 <input> 標籤下各種不同的type,像是 text, radio, submit 等等,格式如下:

1
2
3
4
5
<form>
.
form elements
.
</form>

Type Description
<input type=”text”> Defines a one-line text input field
<input type=”radio”> Defins a radio button (for selecting one of many choices)
<input type=”submit”> Defines a submit button (for submitting the form)
閱讀全文 »

HTML之Tables、Lists、Blocks

發表於 2017-07-24

Tables

HTML的表格由<table>來定義,<tr>定義一列,<th>定義表格的Header,<td>定義每一列裡面的資料顯示。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Derrick</td>
<td>Chao</td>
<td>28</td>
</tr>
<tr>
<td>Aurora</td>
<td>Yu</td>
<td>28ㄒ</td>
</tr>
</table>

閱讀全文 »

HTML 基礎 Part2

發表於 2017-07-19

HTML 基礎 Part 2

Style Attribute

style屬性可以更改 html 上顯示的樣式。
Syntax

1
<tagname style="property:value;">

property: CSS 中定義的 property
value: CSS 定義相對應property的value

閱讀全文 »

HTML 基礎

發表於 2017-07-19

HTML基礎架構

在HTML架構中會有三個主要標籤:html、head、body,大部分的標籤(tag)都會有開始和結束標籤相對應,格式如下:

1
2
3
4
5
6
<tagName>content...</tagName>
<html></html>
<head></head>
<body></body>
<h1>Hello world!</h1>

基本的HTML template格式如下:

1
2
3
4
5
6
7
8
9
10
<!DOCTYPE html>
<html>
<head>
<title>My WebPage</title>
<meta charset="utf-8">
</head>
<body>
......
</body>
</html>

閱讀全文 »

MySQL 基礎

發表於 2017-07-01

MySQL 基礎

SQL 語言是用來查詢和管理資料庫,全名為 Structure Query Language。


Comment 符號

MySQL 有三種註解用法:

  • #: 單行註解
  • -- : 單行註解 ,第二個dash後須加一個空白,再接文字。
  • /*…*/ :多行註解
閱讀全文 »

PHP include and require

發表於 2017-07-01

PHP include and require 使用

include/require 是用來將其他 PHP file 引入其他的 PHP file中,假設你有一段相同的code要使用在許多 PHP file中,就會需要用到 include/require。

閱讀全文 »

PHP Control Flow Statement

發表於 2017-06-29

PHP Control Flow Statement

這篇文章將介紹以下四種 Control Flow:

  • If…Else…Elseif
  • Switch
  • While Loops
  • For Loops
閱讀全文 »

PHP 運算子

發表於 2017-06-29

PHP 運算子

Arithmetic Operators

算術運算子拿來做數字的加、減、乘、除等等運算。

Operator Name Example Result
+ Addiction $x + $y Sum of $x and $y
- Substraction $x - $y Difference of $x and $y
* Multiplication $x * $y Product of $x and $y
/ Division $x / $y Quotient of $x and $y
% Moduls $x % $y Remainder of $x divided by $y
** Exponentiation $x ** $y Result of raising $x to the $y’th power (Introduced in PHP 5.6)
閱讀全文 »

PHP Data Type

發表於 2017-06-29

PHP Data Type

PHP 的資料型別有以下這幾種:

  • String
  • Integer
  • Float
  • Boolean
  • Array
  • Object
  • NULL
  • Resource
閱讀全文 »

PHP 基礎觀念和語法

發表於 2017-06-29

PHP 基礎觀念和語法

Intro & Syntax

  • PHP 是一種樣板語言,可以混合 HTML 直接輸出成網頁。
  • 為純文字檔案是以 .php 結尾。
  • 撰寫 PHP 語法時,必須將語法包裹在  <?php ?> 裡面去寫。
  • 每一段程式碼需要以 ; 結尾。
    1
    2
    3
    4
    <?php
    $var = 'A string';
    echo $var;
    ?>
閱讀全文 »
12
Derrick Chao

Derrick Chao

Share my everything in my life.

13 文章
7 標籤
© 2017 Derrick Chao
由 Hexo 強力驅動
主題 - NexT.Pisces