Code drawers
3 นาที
ลิ้นชักโค้ดเป็นวิธีที่ยอดเยี่ยมในการแสดงตัวอย่างโค้ดในเลย์เอาต์แบบสามคอลัมน์ นี่คือตัวอย่างหนึ่ง ‘‘‘ let x, y, z; // statement 1 x = 5; // statement 2 y = 6; // statement 3 z = x + y; // statement 4 document getelementbyid("demo") innerhtml = "the value of z is " + z + " "; # program to find the sum of all numbers stored in a list \# list of numbers numbers = \[6, 5, 3, 8, 4, 2, 5, 4, 11] \# variable to store the sum sum = 0 \# iterate over the list for val in numbers sum = sum+val print("the sum is", sum) นี่คือตัวอย่างอีกอันหนึ่ง let x, y, z; // statement 1 x = 5; // statement 2 y = 6; // statement 3 z = x + y; // statement 4 document getelementbyid("demo") innerhtml = "the value of z is " + z + " "; # program to find the sum of all numbers stored in a list \# list of numbers numbers = \[6, 5, 3, 8, 4, 2, 5, 4, 11] \# variable to store the sum sum = 0 \# iterate over the list for val in numbers sum = sum+val print("the sum is", sum) และนี่คือภาพหน้าจอขณะกำลังแก้ไข มาร์กดาวน์ ใช้มาร์กดาวน์ต่อไปนี้เพื่อสร้างบล็อก code drawer \### test codedrawer \ codedrawer{title="a code drawer"} \ codeblocktabs examples ```php // some wordpress plugi // add our plugin's option page to the wp admin menu public function add plugin options page() { add options page( 'example plugin settings', 'example plugin settings', 'manage options', 'ex', \[$this, 'render admin page'] ); } ``` ```go // next should be used only inside middleware // it executes the pending handlers in the chain inside the calling handler // see example in github func (c context) next() { c index++ for c index < int8(len(c handlers)) { c handlers\[c index]\(c) c index++ } } ``` ```javascript // demo js ``` \ \ codeblocktabs responses ```json // 404 not found { requirefingerprintscope true, maxmachines 1, concurrent false, floating false, protected true, strict true } ``` \ \ ค้นหาบล็อกอื่น ๆ ค้นพบวิธีใหม่ ๆ และบล็อกต่าง ๆ เพื่อสร้างหน้าเอกสารที่สวยงามและใช้งานได้ดี ดูบล็อกทั้งหมด docid\ fvbccw7nlvgjbchvbvbg9 ต้องการความช่วยเหลือ? ⬇️ ใช้ สีน้ำเงิน ไอคอนแชท ที่มุมล่างขวา หรือใช้ ai chat (จากช่องค้นหา) เพื่อรับคำตอบอย่างรวดเร็ว ความคิดเห็นของคุณสำคัญ ใช้แบบฟอร์มข้อเสนอแนะด้านล่างได้โดยไม่เปิดเผยตัวตน หรือถามคำถามใน ส่วน q\&a และทีมงานหรือ ai ของเราจะให้คำตอบแก่คุณ
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.