mid({BarcodeInfo.LN},1,8) + "-" + mid({BarcodeInfo.LN},9,2)

/*

ตัวอย่างการใช้งาน:

// กำหนดตัวแปร BarcodeInfo.LN
var BarcodeInfo = {
LN: "1234567890"
};

// ใช้นิพจน์เพื่อดึงหมายเลขบาร์โค้ดในรูปแบบที่กำหนด
var barcodeNumber = mid(BarcodeInfo.LN, 1, 8) + "-" + mid(BarcodeInfo.LN, 9, 2);

// แสดงหมายเลขบาร์โค้ด
console.log(barcodeNumber); // 1234567-89

ในตัวอย่างนี้ ตัวแปร BarcodeInfo.LN ถูกตั้งค่าเป็นค่า 1234567890 นิพจน์ mid() จะดึงอักขระ 8 ตัวแรกจากตัวแปร BarcodeInfo.LN ซึ่งเป็น 1234567 จากนั้นจะดึงอักขระ 2 ตัวถัดไปจากตัวแปร BarcodeInfo.LN ซึ่งเป็น 89 ผลลัพธ์สุดท้ายคือ 1234567-89 ซึ่งแสดงหมายเลขบาร์โค้ดในรูปแบบที่กำหนด*/

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: