以下為作業十四內容
利用 iframe 嵌入投影片
上列繪圖程式碼
from browser import document as doc from browser import console import math
canvas = doc["plotarea"] ctx = canvas.getContext("2d")
ctx.beginPath() ctx.lineWidth = 5 ctx.moveTo(0, 0) ctx.lineTo(100, 100) ctx.strokeStyle = "#FF0000" ctx.stroke()
ctx.beginPath() ctx.lineWidth = 1 ctx.moveTo(100, 0) ctx.lineTo(0, 100) ctx.strokeStyle = "#0000ff" ctx.stroke()
x = 100 y = 100
console.log("x 值為"+str(x)+", y 值為"+str(y))