郭家銘EXCEL VBA雙迴圈JavaScript迴圈
VBA繪圖
VBA繪圖程式碼
'Dr Ian O'Connor, CPA. - located in Victoria, Australia. Option Explicit Const topleft As String = "C5" ' anchor cell Const diam As Integer = 100 ' points Dim Shp As Shape '全域變數global variables 每一個副程式都可以用 Sub 郭家銘() Dim TLCleft As Double '區域local variables只能用在這裡 Dim TLCtop As Double Dim i As Integer For i = 1 To 30 TLCleft = 20 * i TLCtop = 20 * i Set Shp = ActiveSheet.Shapes.AddShape(Type:=msoShapeOval, _ Left:=TLCleft, Top:=TLCtop, _ Width:=diam, Height:=diam) With Shp .Fill.Visible = msoFalse .Line.Weight = 10 .Line.ForeColor.Brightness = 0.4 .ThreeD.BevelTopType = msoBevelCircle End With Next With Cells(1, 1) '物件.字物件 屬性 方法 .Value = "郭家銘" .Interior.Color = RGB(200, 200, 0) With .Font .Size = 20 .Color = RGB(255, 255, 255) .Bold = True End With End With End Sub Sub 郭家銘刪除() '在113影片下有程式碼 For Each Shp In ActiveSheet.Shapes Shp.Delete '將使用中active的工作表sheet的每個圖形shape刪除 Next End Sub輸出
EXCEL迴圈
JavaScrip迴圈
<head><style>h1{padding: 20px; background-color: green; color: white;}</style><script>function year(){ var tmp ="<font size=5 color=#0000FF>"; //輸出HTML指令preserve格式for (var i=0 ; i<= 5; i++){ tmp = tmp + (i+2020) +"年";for (var j=1; j<13; j++){ tmp=tmp + j +"月";}tmp = tmp +"<br/>";}//tmp 是一個字串變數+進行字串的串接加上<br/>html換列命令tmp = tmp + "</font>";document.getElementById("out").innerHTML = tmp;}</script></head><input onclick="year()" type="button" value="超級美女" />
網頁顏色
繼續充實部落格內容 參考 https://sujenchang.blogspot.com/2022/01/109_6.html
回覆刪除