萬宜芸清單方塊ListBox與核取CheckBox嵌入圖片Embed Image
![](https://www.takming.edu.tw/takmingcc/template/img/logo.png)
巢狀條件式if else
期中考非巢狀
三道指令,每個指令都執行,例如已經滿足(r),另外兩道還是去執行。if (r) present("#FF0000");
if (g) present("#00FF00");
if (b) present("#0000FF");
期中考巢狀
變成四道指令,提升程式效率if (r) present("#FF0000");
else if (g) present("#00FF00");//沒有滿足(r)就執行
else if (b) present("#0000FF");
else alert("宜芸 你沒選擇顏色!");
第一週期中考
紅色 綠色 藍色
粗體
輸出
萬宜芸的期中心得
- 嵌入圖片img src來源
- 嵌入臉書網頁iframe src來源
- 嵌入圖片Embed Image
- 嵌入影片iframe src來源
"width寬度 height高度"
- 清單方塊ListBox與核取CheckBox
- 結構化程式設計
- 事件events: onload, onclick
- 自訂函數,命名為abc()
- 條件判斷 If (條件) {條件成立執行} else {不成立執行}
- 巢狀條件式 If...ELSE...ENDIF
- 瀏覽器開發人員工具的F12功能鍵
- 定義字串string與連接
- 選項按鈕Input type="radio"
- 控制流程結構:判斷式if then else、迴圈、區塊結構與函數呼叫
- 巢狀if style定義區塊
- HTML statement 命令 list 清單有 ol=ordered list; ul=undered list
- padding: soft material such as foam or cloth used to pad or stuff something.
例句"cushions supplied extra and decoration"
緩衝器cushions提供額外的填充padding與裝飾decoration - JavaScript指令
- onclick按下滑鼠事件
- 條件判斷IF (條件){成立執行} ELSE {不成立}
- 表單form的文字text數字number下拉式選單
- document網頁文件
- getElementById().Value取得一個元素的「值」
- 這個「值」是該元素的屬性
- onclick按下滑鼠呼叫函數
- click事件發生時,指定去執行compute()
- 指定 assign 或取代 replace 內容
- 內建函數alert()
- document.getElementById().innerHTML
- 文件.方法(位置id).呈現HTML命令
- getElementById自訂函數
- 表單Text與Select
- input type="text" value="文字"
輸入文字方塊 value預設值 - select id="文字"
option 文字 /option
option 文字 /option
option 文字 /option
/select - 迴圈For
- 迴圈基本架構
for 變數 = 初始值 ; 變數(限制值;變數+步進值){要執行的程式碼} - 迴圈範例
script language="javascript"
for(i=0;i 5;i++){
document.write(i);
}
/script
先進行,非常好。
回覆刪除