江舜廷清單方塊ListBox與核取方塊CheckBox鑲入圖片Embed Image
巢狀條件式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("輸入的顏色條件,不滿足r, g, b,其他的!");
紅色 綠色 藍色
粗體
輸出
留言
張貼留言