20241028.CANVAS

選擇權到期日損益

if (條件) {成立執行;} else {不成立執行;};

以上的程式碼

<h3>選擇權到期日損益</h3>
<canvas id="Canvas210" width="900" height="500">
</canvas>
<script>
const canvas = document.getElementById("Canvas210");
const BuyPut = canvas.getContext("2d");
BuyPut.beginPath();
BuyPut.moveTo(0,0);
BuyPut.lineTo(200,200);
BuyPut.lineTo(400,200);
BuyPut.strokeStyle = "black";
BuyPut.lineWidth  = 2;
BuyPut.font = "32px 標楷體";
BuyPut.fillText("買入賣權Put",200,50);
BuyPut.stroke();
const SellPut = canvas.getContext("2d");
SellPut.beginPath();
SellPut.moveTo(0,500);
SellPut.lineTo(200,300);
SellPut.lineTo(400,300);
SellPut.strokeStyle = "black";
SellPut.lineWidth  = 2;
SellPut.stroke();
const BuyCall = canvas.getContext("2d");
BuyCall.beginPath();
BuyCall.moveTo(500,200);
BuyCall.lineTo(700,200);
BuyCall.lineTo(900,0);
BuyCall.strokeStyle = "black";
BuyCall.lineWidth  = 2;
BuyCall.stroke();
const SellCall = canvas.getContext("2d");
SellCall.beginPath();
SellCall.moveTo(500,300);
SellCall.lineTo(700,300);
SellCall.lineTo(900,500);
SellCall.strokeStyle = "black";
SellCall.lineWidth  = 2;
SellCall.stroke();
</script>

最後的結果:有按鈕BUTTON

<BUTTON ONCLICK='MY()' STYLE="BACKGROUND-COLOR:YELLOW;">說明</BUTTON>
<canvas id="Canvas210" width="900" height="500">
</canvas>
<script>
function MY(){
const canvas = document.getElementById("Canvas210");
const BuyPut = canvas.getContext("2d");
BuyPut.beginPath();
BuyPut.moveTo(0,0);
BuyPut.lineTo(200,200);
BuyPut.lineTo(400,200);
BuyPut.strokeStyle = "black";
BuyPut.lineWidth  = 2;
BuyPut.font = "24px 標楷體";
BuyPut.fillText("買入賣權Put,認售權證",200,50);
BuyPut.stroke();
const SellPut = canvas.getContext("2d");
SellPut.beginPath();
SellPut.moveTo(0,500);
SellPut.lineTo(200,300);
SellPut.lineTo(400,300);
SellPut.strokeStyle = "black";
SellPut.lineWidth  = 2;
SellPut.fillText("賣出賣權Put,認售權證",200,450);
SellPut.stroke();
const BuyCall = canvas.getContext("2d");
BuyCall.beginPath();
BuyCall.moveTo(500,200);
BuyCall.lineTo(700,200);
BuyCall.lineTo(900,0);
BuyCall.strokeStyle = "black";
BuyCall.lineWidth  = 2;
BuyCall.fillText("買入買權Call,認購權證",500,50);
BuyCall.stroke();
const SellCall = canvas.getContext("2d");
SellCall.beginPath();
SellCall.moveTo(500,300);
SellCall.lineTo(700,300);
SellCall.lineTo(900,500);
SellCall.strokeStyle = "black";
SellCall.lineWidth  = 2;
SellCall.fillText("賣出買權Call,認購權證",500,450);
SellCall.stroke();
}
</script>

留言

  1. 作者已經移除這則留言。

    回覆刪除
  2. https://lu-chieh-chi.blogspot.com/2024/10/20241028canvasapple.html

    回覆刪除
  3. https://xie-ni.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  4. https://yangsinmei.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  5. https://h5ying.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  6. https://egdvcn-gh.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  7. https://laichia-jung.blogspot.com/2024/10/canvsapple_27.html

    回覆刪除
  8. https://djhdvdhd.blogspot.com/2024/10/blog-post_27.html

    回覆刪除
  9. https://allyking097.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  10. https://yuci0124.blogspot.com/2024/10/20241028canvas.html

    回覆刪除
  11. https://wihfaw.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  12. https://hsulining9999.blogspot.com/2024/10/20241028canvas.html

    回覆刪除
  13. https://d11117242.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  14. https://yuxi1202.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  15. https://jiang233.blogspot.com/2024/10/20241028canvas.html

    回覆刪除
  16. https://yichen0617.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  17. https://wei1029.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  18. https://spy0928.blogspot.com/2024/10/20241028canvas-apple.html

    回覆刪除
  19. https://chang-yam-ci.blogspot.com/2024/10/canvas-apple.html

    回覆刪除
  20. https://wwersseraaer.blogspot.com/2024/10/canvasapppe.html

    回覆刪除
  21. https://yezonghan.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  22. https://guovupvmp.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  23. https://htmlsyuan.blogspot.com/2024/10/canvas.html

    回覆刪除
  24. https://lintingyang11317134.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  25. https://huangjunzhu.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  26. https://enxaing.blogspot.com/2024/10/20241028canvas-apple.html

    回覆刪除
  27. https://htmlcss-hsiao.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  28. https://huangchenyang.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  29. https://jjjjiaying.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  30. https://zzy-hn.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  31. https://sklnfijseifjsk.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  32. https://yehjungwen.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  33. https://syx0304syx.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  34. https://wuzhiyou.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  35. https://pengyikai.blogspot.com/2024/10/function-my-const-canvas-document.html

    回覆刪除
  36. https://lupeiying.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  37. https://chiu-wei-jie.blogspot.com/2024/10/473button.html

    回覆刪除
  38. https://yangbokai.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  39. https://zhuo-you-wen.blogspot.com/2024/10/const-canvas-document.html

    回覆刪除
  40. https://chan0528.blogspot.com/2024/10/htmlcssjavascriptpythonjava.html

    回覆刪除
  41. https://acdhdwstzws.blogspot.com/2024/10/applecanvas.html

    回覆刪除
  42. https://huutingyu.blogspot.com/2024/10/applecanvas.html

    回覆刪除
  43. 作者已經移除這則留言。

    回覆刪除
  44. https://xxxjkxxthf.blogspot.com/2024/10/20241028canvas.html

    回覆刪除
  45. https://zhang-1108.blogspot.com/2024/10/blog-post.html

    回覆刪除
  46. https://jamie941128.blogspot.com/2024/10/httpsmumeng-ru.blogspot.com2024102024.html

    回覆刪除
  47. https://linchengxun.blogspot.com/2024/10/canvas.htm

    回覆刪除
  48. https://ting11111.blogspot.com/2024/10/h1background-colorpurple-colorwhite.html

    回覆刪除
  49. https://tzuchenchu.blogspot.com/2024/10/2024.html

    回覆刪除
  50. https://huuiiiiman.blogspot.com/2024/10/2024.html

    回覆刪除
  51. https://dbdodjdk.blogspot.com/2024/10/canvas-apple.html

    回覆刪除
  52. https://gbsddik.blogspot.com/2024/10/applecanvas.html

    回覆刪除
  53. https://www.blogger.com/blog/post/edit/preview/5282033484822785181/2016326503808299530

    回覆刪除
  54. https://yiyiiiii.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  55. https://kuchingyu.blogspot.com/2024/10/function-abc-const-canvas-document.html

    回覆刪除
  56. https://yuweiiiiiiiiiiii.blogspot.com/2024/10/2024.html

    回覆刪除
  57. https://ericfggf554466.blogspot.com

    回覆刪除
  58. https://koala111222.blogspot.com/2024/10/applecanvas.html

    回覆刪除
  59. https://chiuerya0515.blogspot.com/2024/10/2024.html

    回覆刪除
  60. https://ben0409.blogspot.com/2024/10/canvasapple.html

    回覆刪除
  61. https://yangyoyo0125.blogspot.com/2024/11/const-canvas-document.html

    回覆刪除
  62. https://guovupvmp.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  63. https://huangchenyang.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  64. https://chen-kai01htmlshow210.blogspot.com/2024/11/function-my-const-show-document.html#show210

    回覆刪除
  65. https://yuxi1202.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  66. https://sklnfijseifjsk.blogspot.com/2024/11/blog-post.html

    回覆刪除
  67. https://enxaing.blogspot.com/2024/11/2.html#show210

    回覆刪除
  68. https://ting100000.blogspot.com/2024/10/h1background-colorpurple-colorwhite.html#show210

    回覆刪除
  69. https://ericfggf554466.blogspot.com/2024/11/blog-post.html

    回覆刪除
  70. https://s98410769.blogspot.com/2024/11/d11350107.html#210

    回覆刪除
  71. https://zyixnn.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  72. https://slu804387.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  73. https://www.blogger.com/blog/post/edit/preview/7142461537043228938/8536363586174289025#show210

    回覆刪除
  74. 作者已經移除這則留言。

    回覆刪除
  75. 作者已經移除這則留言。

    回覆刪除
  76. https://pei940922.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  77. https://mumeng-ru.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  78. https://jamie941128.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  79. https://sincewayne.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除
  80. https://yiyiiiii.blogspot.com/2024/11/h1background-colorpurple-colorwhite.html#show210

    回覆刪除
  81. https://vovo8564513.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除

  82. https://yimignsocool.blogspot.com/2024/11/blog-post.html#show210

    回覆刪除

張貼留言

這個網誌中的熱門文章

劉任昌學習Bro Code製作計算機

劉任昌STYLE,SCRIPT在HTML之後